|
|
@ -45,9 +45,10 @@ fn main() { |
|
|
|
.take(2) |
|
|
|
.take(2) |
|
|
|
.map(|record| { dump_record(&record); record }) |
|
|
|
.map(|record| { dump_record(&record); record }) |
|
|
|
.fold(None, {|first, current| { |
|
|
|
.fold(None, {|first, current| { |
|
|
|
match first { |
|
|
|
if let Some(_) = first { |
|
|
|
Some(x) => Some(x), |
|
|
|
first |
|
|
|
None => Some(current.id) |
|
|
|
} else { |
|
|
|
|
|
|
|
Some(current.id) |
|
|
|
} |
|
|
|
} |
|
|
|
}}); |
|
|
|
}}); |
|
|
|
log::debug!("First favourite: {:?}", most_recent_favourite); |
|
|
|
log::debug!("First favourite: {:?}", most_recent_favourite); |
|
|
|