Browse Source

Fix: remove useless code in one example

master
Wilfried OLLIVIER 2 weeks ago
parent
commit
70820ecf01
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      content/post/03-bites-the-rust.md

+ 2
- 2
content/post/03-bites-the-rust.md View File

@@ -399,12 +399,12 @@ fn match_likes_djent(b: Bands) -> Option<Bands> {
399 399
 
400 400
 // Do it djent and do I like it ? the map version !
401 401
 fn map_likes_djent(b: Bands) -> Option<Option<Bands>> {
402
-    does_it_djent(b).map(|b| likes(b))
402
+    does_it_djent(b).map(likes)
403 403
 }
404 404
 
405 405
 // Do it djents and do I like it ? the and_then version !
406 406
 fn and_then_likes_djent(b: Bands) -> Option<Bands> {
407
-    does_it_djent(b).and_then(|b| likes(b))
407
+    does_it_djent(b).and_then(likes)
408 408
 }
409 409
 
410 410
 fn main() {

Loading…
Cancel
Save