prettier tuple handling
This commit is contained in:
parent
4eb1ae5402
commit
68279afeeb
1 changed files with 3 additions and 3 deletions
|
@ -228,8 +228,8 @@ async fn render(
|
||||||
.pages
|
.pages
|
||||||
.clone()
|
.clone()
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|i| match i.1.timestamp {
|
.filter_map(|(path, page)| match page.timestamp {
|
||||||
Some(ts) => Some((i.0, SystemTime::now().duration_since(ts).unwrap())),
|
Some(ts) => Some((path, SystemTime::now().duration_since(ts).unwrap())),
|
||||||
None => None,
|
None => None,
|
||||||
})
|
})
|
||||||
.collect::<Vec<(String, Duration)>>();
|
.collect::<Vec<(String, Duration)>>();
|
||||||
|
@ -249,7 +249,7 @@ async fn render(
|
||||||
"recently_changed",
|
"recently_changed",
|
||||||
&recently_changed
|
&recently_changed
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|i| (i.0, timeago.convert(i.1)))
|
.map(|(path, duration)| (path, timeago.convert(duration)))
|
||||||
.collect::<Vec<(String, String)>>(),
|
.collect::<Vec<(String, String)>>(),
|
||||||
);
|
);
|
||||||
context.insert(
|
context.insert(
|
||||||
|
|
Loading…
Reference in a new issue