You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is unclear to me how to use bytes::complete::escape_transform on bytestrings, because the only implementors of ExtendInto<Extender=Vec<u8>> are [u8] and &[u8], neither of which can be returned without borrowing from the input.
Rust version : rustc 1.46.0
nom version : 5.0.0
nom compilation features used:
Test case
use nom::{
bytes::complete::{escaped_transform, take, is_not},
combinator::{map},};fnmain(){let res: nom::IResult<_,_> = escaped_transform(// Error: ExtendInto is not implemented for u8is_not(r#"\""#),'\\',map(take(1u32), |bytes:&[u8]| match bytes[0]{b'n' => b'\n',
b => b,}),)(b"sfj\\n\\isoeg");assert_eq!(res,Ok((&b""[..],b"sfj\nisoeg".to_vec())))}