m4rw3r/chomp

Question: What is the idiomatic way of parsing a string from a byte slice?

kjvalencik opened this issue · 0 comments

In other words, is there a concise way to map an arbitrary Result to a chomp error?

In nom, I would do the following:

map_res!(
	take_until_and_consume!("\n"),
	str::from_utf8
)

How would I do that with chomp?