mirror of
https://github.com/0xMassi/webclaw.git
synced 2026-06-06 22:05:13 +02:00
style(reddit): use Option::zip to satisfy clippy
CI runs clippy with `-D warnings` on a newer toolchain that flags `manual_option_zip`; collapse the and_then/map pair into Option::zip.
This commit is contained in:
parent
f6000cba52
commit
58d274ffe9
1 changed files with 1 additions and 1 deletions
|
|
@ -422,7 +422,7 @@ fn parse_one_comment(c: ElementRef, op: &str, depth: usize) -> Option<RedditComm
|
||||||
let score = entry.and_then(comment_score);
|
let score = entry.and_then(comment_score);
|
||||||
|
|
||||||
let created_utc = entry
|
let created_utc = entry
|
||||||
.and_then(|e| Selector::parse("time[datetime]").ok().map(|s| (e, s)))
|
.zip(Selector::parse("time[datetime]").ok())
|
||||||
.and_then(|(e, s)| e.select(&s).next())
|
.and_then(|(e, s)| e.select(&s).next())
|
||||||
.and_then(|t| t.value().attr("datetime"))
|
.and_then(|t| t.value().attr("datetime"))
|
||||||
.map(str::to_string);
|
.map(str::to_string);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue