Val Lorentz

Results 511 comments of Val Lorentz

This is not my network; and I don't see how that's relevant to this discussion. If you don't want `UTF8ONLY`, you should bring it up there or not use their...

Hi, I didn't use verbose errors with nom 5 yet, but it looks like this is not related to `nom_locate`. Individual parser functions are not supposed to override the error...

Indeed. I wonder why nom implemented it only for `&str` instead of `ToStr` or something. ping @Geal

@tversteeg I didn't play around much with nom5 yet, but afaik with nom5 you must always explictely write the input and return types (because (sub)parsers are now written as functions...

Hmm, interesting. Sadly, https://github.com/rust-lang/rust/issues/31844 isn't stable yet, so we can't have both; and adding a cfg feature seems overkill (and doesn't really solve the problem since both can't be used...

:( I think the right fix would be for `nom` to implement these for any type implementing a certain trait (probably `InputTake`).

Or alternatively, @eignnx's idea in #55 might solve this issue as well

Hi, The fragment is typically a slice over an array/string that `nom_locate` doesn't own (eg. `&str` or `&[u8]`), so `LocatedSpan::fragment()` returns a reference to a slice (ie. `&&str` or `&&[u8]`)...

Yeah, you're right. But `LocatedSpan` needs to implement of nom traits, and `nom_locate` only implements them when `T` is `&str` or `&[u8]` so using a different type won't be trivial.