@@ -172,10 +172,10 @@ fn check(cache: &mut Cache, root: &Path, file: &Path, errors: &mut bool) -> Opti
172
172
{
173
173
return ;
174
174
}
175
- let mut parts = url. splitn ( 2 , "#" ) ;
175
+ let mut parts = url. splitn ( 2 , '#' ) ;
176
176
let url = parts. next ( ) . unwrap ( ) ;
177
177
let fragment = parts. next ( ) ;
178
- let mut parts = url. splitn ( 2 , "?" ) ;
178
+ let mut parts = url. splitn ( 2 , '?' ) ;
179
179
let url = parts. next ( ) . unwrap ( ) ;
180
180
181
181
// Once we've plucked out the URL, parse it using our base url and
@@ -258,7 +258,7 @@ fn check(cache: &mut Cache, root: &Path, file: &Path, errors: &mut bool) -> Opti
258
258
}
259
259
260
260
// These appear to be broken in mdbook right now?
261
- if fragment. starts_with ( "-" ) {
261
+ if fragment. starts_with ( '-' ) {
262
262
return ;
263
263
}
264
264
@@ -324,7 +324,7 @@ fn load_file(
324
324
}
325
325
326
326
fn maybe_redirect ( source : & str ) -> Option < String > {
327
- const REDIRECT : & ' static str = "<p>Redirecting to <a href=" ;
327
+ const REDIRECT : & str = "<p>Redirecting to <a href=" ;
328
328
329
329
let mut lines = source. lines ( ) ;
330
330
let redirect_line = lines. nth ( 6 ) ?;
@@ -345,11 +345,11 @@ fn with_attrs_in_source<F: FnMut(&str, usize, &str)>(contents: &str, attr: &str,
345
345
// we can get away with using one pass.
346
346
let is_base = line[ ..j] . ends_with ( "<base" ) ;
347
347
line = rest;
348
- let pos_equals = match rest. find ( "=" ) {
348
+ let pos_equals = match rest. find ( '=' ) {
349
349
Some ( i) => i,
350
350
None => continue ,
351
351
} ;
352
- if rest[ ..pos_equals] . trim_start_matches ( " " ) != "" {
352
+ if rest[ ..pos_equals] . trim_start_matches ( ' ' ) != "" {
353
353
continue ;
354
354
}
355
355
@@ -361,7 +361,7 @@ fn with_attrs_in_source<F: FnMut(&str, usize, &str)>(contents: &str, attr: &str,
361
361
} ;
362
362
let quote_delim = rest. as_bytes ( ) [ pos_quote] as char ;
363
363
364
- if rest[ ..pos_quote] . trim_start_matches ( " " ) != "" {
364
+ if rest[ ..pos_quote] . trim_start_matches ( ' ' ) != "" {
365
365
continue ;
366
366
}
367
367
let rest = & rest[ pos_quote + 1 ..] ;
0 commit comments