Change single char str patterns to chars
This commit is contained in:
parent
210d61f05c
commit
49c8ba91c7
9 changed files with 13 additions and 13 deletions
|
|
@ -165,7 +165,7 @@ impl<'a> Crate<'a> {
|
|||
impl<'a> CrateVersion<'a> {
|
||||
/// Returns the struct and whether or not the dep is in-tree
|
||||
pub fn from_str(s: &'a str) -> (Self, bool) {
|
||||
let mut parts = s.split(" ");
|
||||
let mut parts = s.split(' ');
|
||||
let name = parts.next().unwrap();
|
||||
let version = parts.next().unwrap();
|
||||
let path = parts.next().unwrap();
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features {
|
|||
None
|
||||
} else {
|
||||
next_feature_is_rustc_internal = false;
|
||||
let s = issue_str.split("(").nth(1).unwrap().split(")").nth(0).unwrap();
|
||||
let s = issue_str.split('(').nth(1).unwrap().split(')').nth(0).unwrap();
|
||||
Some(s.parse().unwrap())
|
||||
};
|
||||
Some((name.to_owned(),
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ pub fn check(path: &Path, bad: &mut bool) {
|
|||
let skip_length = contents.contains("ignore-tidy-linelength");
|
||||
let skip_end_whitespace = contents.contains("ignore-tidy-end-whitespace");
|
||||
let mut trailing_new_lines = 0;
|
||||
for (i, line) in contents.split("\n").enumerate() {
|
||||
for (i, line) in contents.split('\n').enumerate() {
|
||||
let mut err = |msg: &str| {
|
||||
tidy_error!(bad, "{}:{}: {}", file.display(), i + 1, msg);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue