You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
2.4 KiB
57 lines
2.4 KiB
From 55030c7543d8e877ec7a6b577a51422c38f01259 Mon Sep 17 00:00:00 2001
|
|
From: Josh Stone <jistone@redhat.com>
|
|
Date: Fri, 1 Mar 2019 09:27:45 -0800
|
|
Subject: [PATCH] Backport deprecation fixes from commit b7f030e
|
|
|
|
---
|
|
src/tools/linkchecker/main.rs | 6 +++---
|
|
src/tools/tidy/src/features.rs | 2 +-
|
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs
|
|
index 59662be349dc..2cf0fcfd34cd 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..];
|
|
diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs
|
|
index 2435a0cfd4e3..bf2cfbf32fc7 100644
|
|
--- a/src/tools/tidy/src/features.rs
|
|
+++ b/src/tools/tidy/src/features.rs
|
|
@@ -188,7 +188,7 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features {
|
|
}
|
|
|
|
let mut parts = line.split(',');
|
|
- let level = match parts.next().map(|l| l.trim().trim_left_matches('(')) {
|
|
+ let level = match parts.next().map(|l| l.trim().trim_start_matches('(')) {
|
|
Some("active") => Status::Unstable,
|
|
Some("removed") => Status::Removed,
|
|
Some("accepted") => Status::Stable,
|
|
--
|
|
2.20.1
|
|
|
|
|