diff options
| author | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2015-02-25 08:20:34 +0200 |
|---|---|---|
| committer | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2015-02-26 07:21:26 +0200 |
| commit | 8b2ff472cf0d1e348cc369e2e2927dc552582b32 (patch) | |
| tree | c325919286138b814a64027ae8d0bb028621bd08 /src/rustbook | |
| parent | 610d1695d1e0f1bb4e59449d8ba70409b1dc610c (diff) | |
| download | rust-8b2ff472cf0d1e348cc369e2e2927dc552582b32.tar.gz rust-8b2ff472cf0d1e348cc369e2e2927dc552582b32.zip | |
remove some compiler warnings
Diffstat (limited to 'src/rustbook')
| -rw-r--r-- | src/rustbook/book.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rustbook/book.rs b/src/rustbook/book.rs index 3c116aa860b..8900b60d191 100644 --- a/src/rustbook/book.rs +++ b/src/rustbook/book.rs @@ -114,12 +114,12 @@ pub fn parse_summary<R: Reader>(input: R, src: &Path) -> Result<Book, Vec<String } }; - let star_idx = match line.find_str("*") { Some(i) => i, None => continue }; + let star_idx = match line.find("*") { Some(i) => i, None => continue }; - let start_bracket = star_idx + line[star_idx..].find_str("[").unwrap(); - let end_bracket = start_bracket + line[start_bracket..].find_str("](").unwrap(); + let start_bracket = star_idx + line[star_idx..].find("[").unwrap(); + let end_bracket = start_bracket + line[start_bracket..].find("](").unwrap(); let start_paren = end_bracket + 1; - let end_paren = start_paren + line[start_paren..].find_str(")").unwrap(); + let end_paren = start_paren + line[start_paren..].find(")").unwrap(); let given_path = &line[start_paren + 1 .. end_paren]; let title = line[start_bracket + 1..end_bracket].to_string(); |
