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
|
||||
.clone()
|
||||
.into_iter()
|
||||
.filter_map(|i| match i.1.timestamp {
|
||||
Some(ts) => Some((i.0, SystemTime::now().duration_since(ts).unwrap())),
|
||||
.filter_map(|(path, page)| match page.timestamp {
|
||||
Some(ts) => Some((path, SystemTime::now().duration_since(ts).unwrap())),
|
||||
None => None,
|
||||
})
|
||||
.collect::<Vec<(String, Duration)>>();
|
||||
|
@ -249,7 +249,7 @@ async fn render(
|
|||
"recently_changed",
|
||||
&recently_changed
|
||||
.into_iter()
|
||||
.map(|i| (i.0, timeago.convert(i.1)))
|
||||
.map(|(path, duration)| (path, timeago.convert(duration)))
|
||||
.collect::<Vec<(String, String)>>(),
|
||||
);
|
||||
context.insert(
|
||||
|
|
Loading…
Reference in a new issue