clippy: single-character string constant used as pattern

This commit is contained in:
Graham Christensen 2019-01-02 18:57:34 -05:00
parent fc8494b45f
commit 2a908134ac
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C
2 changed files with 3 additions and 3 deletions

View file

@ -196,7 +196,7 @@ fn parse_lines(data: &mut BufRead) -> PackageOutPaths {
if split.len() == 2 {
let outpaths = String::from(split[1]);
let path: Vec<&str> = split[0].rsplitn(2, ".").collect();
let path: Vec<&str> = split[0].rsplitn(2, '.').collect();
if path.len() == 2 {
Some((
PackageArch {

View file

@ -654,7 +654,7 @@ fn parse_commit_messages(messages: &[String]) -> Vec<String> {
.iter()
.filter_map(|line| {
// Convert "foo: some notes" in to "foo"
let parts: Vec<&str> = line.splitn(2, ":").collect();
let parts: Vec<&str> = line.splitn(2, ':').collect();
if parts.len() == 2 {
Some(parts[0])
} else {
@ -662,7 +662,7 @@ fn parse_commit_messages(messages: &[String]) -> Vec<String> {
}
})
.flat_map(|line| {
let pkgs: Vec<&str> = line.split(",").collect();
let pkgs: Vec<&str> = line.split(',').collect();
pkgs
})
.map(|line| line.trim().to_owned())