3 ms·
I guess I’m a bit confused sometimes as what you get when you borrow. Sometimes I can borrow, sometimes I need to call .as_slice() or as_path or as_str
by baby 6y ago
I guess I’m a bit confused sometimes as what you get when you borrow. Sometimes I can borrow, sometimes I need to call .as_slice() or as_path or as_str
- steveklabnik 6y agoYeah, so thanks to “Deref coercion” a &Vec<T> will coerce into a &[T] in many places. That’s probably what you’re seeing.