Skip to content

Commit 86abdc0

Browse files
committed
refactor: Resolve deprecations
1 parent 5738aae commit 86abdc0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/path/parser.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ pub(crate) fn from_str(input: &str) -> Result<Expression, ParseError<&str, Conte
2323
path.parse(input)
2424
}
2525

26-
fn path(i: &mut &str) -> PResult<Expression> {
26+
fn path(i: &mut &str) -> ModalResult<Expression> {
2727
let root = ident.parse_next(i)?;
2828
let postfix = repeat(0.., postfix).parse_next(i)?;
2929
let expr = Expression { root, postfix };
3030
Ok(expr)
3131
}
3232

33-
fn postfix(i: &mut &str) -> PResult<Postfix> {
33+
fn postfix(i: &mut &str) -> ModalResult<Postfix> {
3434
dispatch! {any;
3535
'[' => cut_err(
3636
seq!(
@@ -51,7 +51,7 @@ fn postfix(i: &mut &str) -> PResult<Postfix> {
5151
.parse_next(i)
5252
}
5353

54-
fn ident(i: &mut &str) -> PResult<String> {
54+
fn ident(i: &mut &str) -> ModalResult<String> {
5555
take_while(1.., ('a'..='z', 'A'..='Z', '0'..='9', '_', '-'))
5656
.map(ToOwned::to_owned)
5757
.context(StrContext::Label("identifier"))
@@ -63,7 +63,7 @@ fn ident(i: &mut &str) -> PResult<String> {
6363
.parse_next(i)
6464
}
6565

66-
fn integer(i: &mut &str) -> PResult<isize> {
66+
fn integer(i: &mut &str) -> ModalResult<isize> {
6767
seq!(
6868
_: space0,
6969
(opt('-'), digit1).take().try_map(FromStr::from_str),

0 commit comments

Comments
 (0)