about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorIgor Matuszewski <Xanewok@gmail.com>2019-01-20 00:05:10 +0100
committerIgor Matuszewski <Xanewok@gmail.com>2019-01-20 00:05:10 +0100
commitff41abcf8bbeefae4df033d6a1bac1543d67c388 (patch)
treecdc3e2f623a024ef2d5bbbeaa2c2ab39b528e09d /src
parentc14508fd252742e6f7ad99b1519ef1039b1eb80c (diff)
downloadrust-ff41abcf8bbeefae4df033d6a1bac1543d67c388.tar.gz
rust-ff41abcf8bbeefae4df033d6a1bac1543d67c388.zip
linkchecker: Update deprecated trim_left_matches usage
Diffstat (limited to 'src')
-rw-r--r--src/tools/linkchecker/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs
index 59662be349d..2cf0fcfd34c 100644
--- a/src/tools/linkchecker/main.rs
+++ b/src/tools/linkchecker/main.rs
@@ -78,7 +78,7 @@ impl FileEntry {
     fn parse_ids(&mut self, file: &Path, contents: &str, errors: &mut bool) {
         if self.ids.is_empty() {
             with_attrs_in_source(contents, " id", |fragment, i, _| {
-                let frag = fragment.trim_left_matches("#").to_owned();
+                let frag = fragment.trim_start_matches("#").to_owned();
                 let encoded = small_url_encode(&frag);
                 if !self.ids.insert(frag) {
                     *errors = true;
@@ -343,7 +343,7 @@ fn with_attrs_in_source<F: FnMut(&str, usize, &str)>(contents: &str, attr: &str,
                 Some(i) => i,
                 None => continue,
             };
-            if rest[..pos_equals].trim_left_matches(" ") != "" {
+            if rest[..pos_equals].trim_start_matches(" ") != "" {
                 continue;
             }
 
@@ -355,7 +355,7 @@ fn with_attrs_in_source<F: FnMut(&str, usize, &str)>(contents: &str, attr: &str,
             };
             let quote_delim = rest.as_bytes()[pos_quote] as char;
 
-            if rest[..pos_quote].trim_left_matches(" ") != "" {
+            if rest[..pos_quote].trim_start_matches(" ") != "" {
                 continue;
             }
             let rest = &rest[pos_quote + 1..];