summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Turner <jturner.usa@gmail.com>2025-11-22 00:17:14 +0000
committerJohn Turner <jturner.usa@gmail.com>2025-11-22 00:17:14 +0000
commitbd0fec80f95327688a648e5b3cf049746bc48e8c (patch)
tree19921e9b2c65e7f0737118a3d67ad277f3baee6a
parentc06360aed6e410abf0f85859e7f11f74d04d3537 (diff)
downloadgentoo-utils-bd0fec80f95327688a648e5b3cf049746bc48e8c.tar.gz
verify that repo names are also valid package names
-rw-r--r--src/atom/parsers.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/atom/parsers.rs b/src/atom/parsers.rs
index 0d29d2c..0272be1 100644
--- a/src/atom/parsers.rs
+++ b/src/atom/parsers.rs
@@ -247,6 +247,11 @@ impl<'a> Parseable<'a, &'a str> for Repo {
start
.and(rest)
.recognize()
+ .verify_output(move |output: &&str| {
+ Name::parser()
+ .check_finished(InputIter::new(*output))
+ .is_ok()
+ })
.map(|output: &str| Repo(output.to_string()))
}
}