forked from gentoo-utils/gentoo-utils
disallow stars in VersionNumber parser
This commit is contained in:
@@ -40,10 +40,7 @@ impl<'a> Parseable<'a, &'a str> for VersionNumber {
|
|||||||
type Parser = impl Parser<&'a str, Output = Self>;
|
type Parser = impl Parser<&'a str, Output = Self>;
|
||||||
|
|
||||||
fn parser() -> Self::Parser {
|
fn parser() -> Self::Parser {
|
||||||
numeric1()
|
numeric1().map(|output: &str| VersionNumber(output.to_string()))
|
||||||
.followed_by(tag("*").opt())
|
|
||||||
.recognize()
|
|
||||||
.map(|output: &str| VersionNumber(output.to_string()))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user