diff options
| author | John Turner <jturner.usa@gmail.com> | 2025-11-15 01:55:19 +0000 |
|---|---|---|
| committer | John Turner <jturner.usa@gmail.com> | 2025-11-15 01:55:19 +0000 |
| commit | 0436fbc77039fa3d754f2db5cfefdd437fea51d1 (patch) | |
| tree | a0ab9b71cc6c7a157858c787dc6f76436b325d51 /src/atom/parsers.rs | |
| parent | dfaad015b9fea7c3366dd2c453621c3bf161a3c9 (diff) | |
| download | gentoo-utils-0436fbc77039fa3d754f2db5cfefdd437fea51d1.tar.gz | |
fix clippy lints
Diffstat (limited to 'src/atom/parsers.rs')
| -rw-r--r-- | src/atom/parsers.rs | 13 |
1 files changed, 7 insertions, 6 deletions
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] |
