Maybe I don't understand the rules well enough yet, but I kind of like the explicitness of `as_ref` and `as_mut` https://play.rust-lang.org/?gist=807e5a3f61cc46d101d9e0afb450ef31&version=nightly ….
-
-
-
But, I also still use `iter()` and `iter_mut()` rather than `&` and `&mut` and their `IntoIter` impls. I guess I prefer to know the type I'm getting without having to track down the type of the RHS in e.g. `if let Some(x) = what_type_am_i`.
End of conversation
New conversation -
-
-
given that this is probably one of the earliest things i tried, i bet i could get used to it if/when it becomes preferred style
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I like how in release mode it compiles down to 'data = Some(23)' and does that with a single movabsq instruction.
-
Kind of a shame Rust can't do pass-by-immutable-ref to pass-by-value optimization... I guess because there is no trait to express "has no interior mutability"?
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.