From 0436fbc77039fa3d754f2db5cfefdd437fea51d1 Mon Sep 17 00:00:00 2001 From: John Turner Date: Sat, 15 Nov 2025 01:55:19 +0000 Subject: fix clippy lints --- src/atom/parsers.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/atom/parsers.rs') diff --git a/src/atom/parsers.rs b/src/atom/parsers.rs index e72c922..8da8203 100644 --- a/src/atom/parsers.rs +++ b/src/atom/parsers.rs @@ -77,7 +77,7 @@ impl<'a> Parseable<'a, &'a str> for VersionNumbers { .map(|output: &str| VersionNumber(output.to_string())) .separated_by(tag(".")) .at_least(1) - .map(|numbers| VersionNumbers(numbers)) + .map(VersionNumbers) } } @@ -88,7 +88,7 @@ impl<'a> Parseable<'a, &'a str> for VersionSuffixes { VersionSuffix::parser() .separated_by(tag("_")) .at_least(1) - .map(|suffixes| VersionSuffixes(suffixes)) + .map(VersionSuffixes) } } @@ -180,8 +180,8 @@ impl<'a> Parseable<'a, &'a str> for Slot { .opt() .and(SlotName::parser().preceded_by(tag("/")).opt()) .and(SlotOperator::parser().opt()) - .map(|((slot, sub), operator)| Slot { - slot, + .map(|((primary, sub), operator)| Slot { + primary, sub, operator, }) @@ -201,6 +201,7 @@ impl<'a> Parseable<'a, &'a str> for UseDepSign { impl<'a> Parseable<'a, &'a str> for UseDep { type Parser = impl Parser<&'a str, Output = Self>; + #[allow(clippy::many_single_char_names)] fn parser() -> Self::Parser { let a = UseFlag::parser() .and(UseDepSign::parser().opt()) @@ -321,7 +322,7 @@ impl<'a> Parseable<'a, &'a str> for Atom { .numbers() .get() .iter() - .any(|number| number.get().contains("*")) => + .any(|number| number.get().contains('*')) => { true } @@ -414,7 +415,7 @@ mod test { fn test_invalid_usedep() { let it = InputIter::new("foo-bar:slot/sub=[!use]"); - assert!(Atom::parser().check_finished(it).is_err()) + assert!(Atom::parser().check_finished(it).is_err()); } #[test] -- cgit v1.2.3