Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Measter
on Dec 31, 2020
|
parent
|
context
|
favorite
| on:
Rust 1.49.0
Unfortunately that is not always the case. This fails to compile, for example (and is fairly irritating):
let my_str = "Hello".to_owned(); match &my_str { "Hello" => (), _ => () }
glandium
on Jan 1, 2021
[–]
try &*my_str
Measter
on Jan 1, 2021
|
parent
[–]
Yes, that's the trivial "fix" to make it work, but that's not my point. In most other similar situations the compiler does that for me, but not here. It feels like something the compiler should be doing, not me.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: