News for hackers. Stuff that matters.
Re:Rust for Rubyists by cryptonaut on Monday December 25, 2017 @02:08AM (#16003111)
Minor correction:

In the section about converting a vector of strings into integers the article says that the Result returned from parse() is converted to a bool via Result::ok(). However, Result::ok() actually converts the Result<T, E> into a Option<T> which is what filter_map() expects.

Re:Rust for Rubyists by Thiez on Monday December 25, 2017 @08:10AM (#16003968)
They should have just used `flat_map`, which does everything that `filter_map` does and more. In this case the call to `Result::ok` could have been omitted in favour of the identity function (which strangely isn't in the standard library). I wonder why rust even has `filter_map`.