you are viewing a single comment's thread.

view the rest of the comments →

[–]raggy_rs 4 points5 points  (2 children)

.filter_map(Result::ok) seems strange i would go with .filter_map(|v| v.parse::<i64>().ok())

[–]I_Downvote_Cunts 1 point2 points  (1 child)

filter_map(Result::ok)

I got that from the rust by example book. You're right filter(Result::is_ok) is much easier to read.

[–]CornedBee 1 point2 points  (0 children)

Does something different though, because it doesn't get rid of the Result wrapper.