writing nom::combinator::map(number, |o| Token::Number(o)) and trying not to write \o/ instead
3
17
(Dr Doofenshmirtz writing Rust) Behold my new evil scheme, the impl Iterinator!
1
2
(or would Doofenshmirtz call it an Iteratorinator?)
1
ok this is possibly my first actual rust program and it took me all afternoon and when it compiled it worked (ish)
1
3
the (ish) because my nom lexinator failed to cover all octet values as it should have and it seems hard to get the benefit of the compiler’s exhaustiveness checking in this context
1
dear rustc, your error messages are supposed to be top notch, but this is not a helpful way of telling me i need to write `for tok in &mut nom_it`
2
1
1
currently trying out where the semantics of rust’s clone is explained for str and slices - i guess they aren’t copy but where is that explained?
3
Replying to @fanf
&str and &[T] are Copy, but if you're into cloning then you probably want owned content not borrowed content. Owned strings are String not &str, and owned slices are Vec<T> not &[T] If you have a &str or &[T] and you want an owned version then the ToOwned trait is your friend.

Sep 29, 2020 Β· 12:22 PM UTC

1