DS
Шел 2020й год
Size: a a a
DS
DS
SP
fn decide_to_download(state: &ThreadState) -> MediaOrThread {
let now = Utc::now();
let u = state
.threads
.iter()
.map(|x| (x, now.signed_duration_since(x.last_crawled)))
.max_by_key(|x| x.1)
.filter(|x| x.1 > Duration::seconds(10));
if let Some(obj) = u {
let thread = obj.0;
return MediaOrThread::Thread(thread.clone());
}
A
SP
SP
G
SP
G
DS
SP
DS
SP
SP
r
SP
SP
DF
DF
DF