disallow stars in VersionNumber parser

This commit is contained in:
John Turner
2025-11-12 23:05:36 +00:00
parent 008e94b3d5
commit 732c129c67

View File

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