I miss the "foreach" method for Options in #rustlang (and no, iter() isn't the same, since I still have to case match against the elements)
-
-
Replying to @allenageorge
if you're referring to Scala, I _believe_ that's map in Rust
2 replies 0 retweets 0 likes -
Replying to @rustlang
I think I didn't express myself clearly :) map() in Scala and Rust execute a lambda over the value of an option if it's defined
1 reply 0 retweets 1 like -
Replying to @allenageorge @rustlang
it's just a convenience(nbd!), since I don't have to do: opt.map(|o| { func(o); () }) if I want to ignore the return from func
1 reply 0 retweets 1 like
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.
