verify that repo names are also valid package names

This commit is contained in:
John Turner
2025-11-22 00:17:14 +00:00
parent c06360aed6
commit bd0fec80f9

View File

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