forked from gentoo-utils/gentoo-utils
update mon and use new ascii parsers
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use mon::{Parser, ParserIter, alphanumeric, one_of, tag};
|
||||
use mon::{Parser, ParserIter, ascii_alphanumeric, one_of, tag};
|
||||
|
||||
use crate::{
|
||||
Parseable,
|
||||
@@ -9,8 +9,11 @@ impl<'a> Parseable<'a, &'a str> for UseFlag {
|
||||
type Parser = impl Parser<&'a str, Output = Self>;
|
||||
|
||||
fn parser() -> Self::Parser {
|
||||
let start = alphanumeric();
|
||||
let rest = alphanumeric().or(one_of("+_@-".chars())).repeated().many();
|
||||
let start = ascii_alphanumeric();
|
||||
let rest = ascii_alphanumeric()
|
||||
.or(one_of("+_@-".chars()))
|
||||
.repeated()
|
||||
.many();
|
||||
|
||||
start
|
||||
.and(rest)
|
||||
|
||||
Reference in New Issue
Block a user