Fix: remove useless code in one example
This commit is contained in:
parent
36847dab91
commit
70820ecf01
1 changed files with 2 additions and 2 deletions
|
@ -399,12 +399,12 @@ fn match_likes_djent(b: Bands) -> Option<Bands> {
|
||||||
|
|
||||||
// Do it djent and do I like it ? the map version !
|
// Do it djent and do I like it ? the map version !
|
||||||
fn map_likes_djent(b: Bands) -> Option<Option<Bands>> {
|
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 !
|
// Do it djents and do I like it ? the and_then version !
|
||||||
fn and_then_likes_djent(b: Bands) -> Option<Bands> {
|
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() {
|
fn main() {
|
||||||
|
|
Loading…
Reference in a new issue