From 70820ecf01c315fccce731285a525ab8936a1e97 Mon Sep 17 00:00:00 2001 From: Wilfried OLLIVIER Date: Sun, 25 Aug 2019 15:24:41 +0200 Subject: [PATCH] Fix: remove useless code in one example --- content/post/03-bites-the-rust.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/post/03-bites-the-rust.md b/content/post/03-bites-the-rust.md index 39af7fc..0966664 100644 --- a/content/post/03-bites-the-rust.md +++ b/content/post/03-bites-the-rust.md @@ -399,12 +399,12 @@ fn match_likes_djent(b: Bands) -> Option { // Do it djent and do I like it ? the map version ! fn map_likes_djent(b: Bands) -> Option> { - 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 { - does_it_djent(b).and_then(|b| likes(b)) + does_it_djent(b).and_then(likes) } fn main() {