Update making_a_new_parser_from_scratch.md

When trying `dbg_dmp` snippet, I noticed it does not compile. This change updates this snippet so that it matches https://docs.rs/nom/latest/nom/error/fn.dbg_dmp.html
This commit is contained in:
barower
2022-10-02 10:57:10 +02:00
committed by Geoffroy Couprie
parent b7bc7eb2c7
commit d19d9f894e
+2 -2
View File
@@ -189,10 +189,10 @@ This function wraps a parser that accepts a `&[u8]` as input and
prints its hexdump if the child parser encountered an error:
```rust
use nom::{dbg_dmp, bytes::complete::tag};
use nom::{IResult, error::dbg_dmp, bytes::complete::tag};
fn f(i: &[u8]) -> IResult<&[u8], &[u8]> {
dbg_dmp(tag("abcd"))(i)
dbg_dmp(tag("abcd"), "tag")(i)
}
let a = &b"efghijkl"[..];