Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
steveklabnik
3 months ago
|
parent
|
context
|
favorite
| on:
Unexpected productivity boost of Rust
Yes, Rust will not automatically turn a value into a reference for you. A reference is the semantic you desire. If you have a value, you’re gonna have to toss & on it. That’s the idiomatic way to do this, not to pass a value and clone it.
&str is Copy, String is not.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
&str is Copy, String is not.