Fix: remove useless code in one example

This commit is contained in:
Wilfried OLLIVIER 2019-08-25 15:24:41 +02:00
parent 36847dab91
commit 70820ecf01

View file

@ -399,12 +399,12 @@ fn match_likes_djent(b: Bands) -> Option<Bands> {
// Do it djent and do I like it ? the map version !
fn map_likes_djent(b: Bands) -> Option<Option<Bands>> {
does_it_djent(b).map(|b| likes(b))
does_it_djent(b).map(likes)
}
// Do it djents and do I like it ? the and_then version !
fn and_then_likes_djent(b: Bands) -> Option<Bands> {
does_it_djent(b).and_then(|b| likes(b))
does_it_djent(b).and_then(likes)
}
fn main() {