Well...
-
clap
crate'sApp
structure has 2 lifetime parameters. There's been some time since I last usedclap
though. - The standard library returns
&str
in many places, whereString
would be preferred. This includes the result of slicing aString
. - Iterators seem complex to implement. In EcmaScript you can simply define a generator
[Symbol.iterator]*() {}
using theyield
operator. Some folks here helped me with definingiter()
, but I still didn't get it at all. Delegate iteration to field Vec In reality I've not been able to make a specific type "iterable", I was just able to provide aniter()
method.
OK, hard to list, because most of the time I end up wrapping some of Rust std
library functionalities with my own crates, but I feel pushed to use both string types due to the standard library. I've just considered a new idea: create my own built-in objects for Rust and prelude them. However, the problem is that ""
still returns &str
, and that's causing the following kind of verbose code, String::from("");
. include_str!()
too will return &str
!