fix clippy lints

This commit is contained in:
John Turner
2025-11-15 01:55:19 +00:00
parent dfaad015b9
commit 0436fbc770
5 changed files with 44 additions and 45 deletions

View File

@@ -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();
}
}

View File

@@ -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>> {