Chars holds onto the underlying &str, meaning it always comes from a &str eventually. The callers don't care what kind of iterator it is, so why have them worry about it? Just use the concrete type, fetch it directly from the &str (as opposed to having it be passed in), and be done with it.
Chars holds onto the underlying &str, meaning it always comes from a &str eventually. The callers don't care what kind of iterator it is, so why have them worry about it? Just use the concrete type, fetch it directly from the &str (as opposed to having it be passed in), and be done with it.