style: various small cleanups
This commit is contained in:
parent
999068bdd9
commit
f240413e2a
|
@ -1,6 +1,7 @@
|
||||||
/target
|
/target
|
||||||
/examples
|
/examples
|
||||||
|
|
||||||
|
/.idea
|
||||||
relays
|
relays
|
||||||
keys
|
keys
|
||||||
*.html
|
*.html
|
|
@ -1,4 +1,3 @@
|
||||||
use std::io::{stdin, stdout, Write};
|
|
||||||
use std::ops::Sub;
|
use std::ops::Sub;
|
||||||
|
|
||||||
use chrono::{DateTime, Local, TimeDelta, TimeZone, Utc};
|
use chrono::{DateTime, Local, TimeDelta, TimeZone, Utc};
|
||||||
|
|
|
@ -546,6 +546,7 @@ async fn main() -> Result<()> {
|
||||||
let (label, times) = tasks.times_tracked();
|
let (label, times) = tasks.times_tracked();
|
||||||
println!("{}\n{}", label.italic(), times.rev().take(15).join("\n"));
|
println!("{}\n{}", label.italic(), times.rev().take(15).join("\n"));
|
||||||
}
|
}
|
||||||
|
// TODO show history from author / pubkey
|
||||||
} else {
|
} else {
|
||||||
let (label, mut times) = tasks.times_tracked();
|
let (label, mut times) = tasks.times_tracked();
|
||||||
println!("{}\n{}", label.italic(), times.join("\n"));
|
println!("{}\n{}", label.italic(), times.join("\n"));
|
||||||
|
@ -559,7 +560,7 @@ async fn main() -> Result<()> {
|
||||||
Some(arg) => {
|
Some(arg) => {
|
||||||
if parse_tracking_stamp(arg).map(|stamp| tasks.track_at(stamp, None)).is_none() {
|
if parse_tracking_stamp(arg).map(|stamp| tasks.track_at(stamp, None)).is_none() {
|
||||||
// So the error message is not covered up
|
// So the error message is not covered up
|
||||||
continue
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -396,7 +396,7 @@ impl Tasks {
|
||||||
let mut tracking_stamp: Option<Timestamp> = None;
|
let mut tracking_stamp: Option<Timestamp> = None;
|
||||||
for elem in
|
for elem in
|
||||||
timestamps(self.history.get(&self.sender.pubkey()).into_iter().flatten(), &vec![t.get_id()])
|
timestamps(self.history.get(&self.sender.pubkey()).into_iter().flatten(), &vec![t.get_id()])
|
||||||
.map(|(e, o)| e) {
|
.map(|(e, _)| e) {
|
||||||
if tracking_stamp.is_some() && elem > now {
|
if tracking_stamp.is_some() && elem > now {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue