forked from gentoo-utils/gentoo-utils
fix clippy lints
This commit is contained in:
@@ -154,10 +154,10 @@ impl<'a> Parseable<'a, &'a str> for Conditional {
|
||||
UseFlag::parser()
|
||||
.preceded_by(tag("!"))
|
||||
.followed_by(tag("?"))
|
||||
.map(|flag| Conditional::Negative(flag))
|
||||
.map(Conditional::Negative)
|
||||
.or(UseFlag::parser()
|
||||
.followed_by(tag("?"))
|
||||
.map(|flag| Conditional::Positive(flag)))
|
||||
.map(Conditional::Positive))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ mod test {
|
||||
for test in tests {
|
||||
SrcUri::parser()
|
||||
.check_finished(InputIter::new(test))
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ fn read_slot(input: &str) -> Option<Result<atom::Slot, Error>> {
|
||||
fn read_homepage(input: &str) -> Option<String> {
|
||||
input
|
||||
.lines()
|
||||
.find_map(|line| line.strip_prefix("HOMEPAGE=").map(|s| s.to_string()))
|
||||
.find_map(|line| line.strip_prefix("HOMEPAGE=").map(str::to_string))
|
||||
}
|
||||
|
||||
fn read_src_uri(input: &str) -> Option<Result<Vec<Depend<SrcUri>>, Error>> {
|
||||
@@ -272,7 +272,7 @@ fn read_license(input: &str) -> Option<Result<Vec<Depend<License>>, Error>> {
|
||||
fn read_description(input: &str) -> Option<String> {
|
||||
input
|
||||
.lines()
|
||||
.find_map(|line| line.strip_prefix("DESCRIPTION=").map(|s| s.to_string()))
|
||||
.find_map(|line| line.strip_prefix("DESCRIPTION=").map(str::to_string))
|
||||
}
|
||||
|
||||
fn read_depend(input: &str) -> Option<Result<Vec<Depend<Atom>>, Error>> {
|
||||
|
||||
Reference in New Issue
Block a user