Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
baby
on May 20, 2020
|
parent
|
context
|
favorite
| on:
Things I hate about Rust
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
on May 20, 2020
[–]
Yeah, so thanks to “Deref coercion” a &Vec<T> will coerce into a &[T] in many places. That’s probably what you’re seeing.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: