fix clippy lints
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user