cleared up all unwraps from the reminder sender. cleared up clippy lints. added undo button
This commit is contained in:
1 parent
8bad95510d
commit
7d43aa5918
15 files changed
+318
-158
No files matched your search
+2
-4
@@ -211,14 +211,12 @@ pub async fn natural_parser(time: &str, timezone: &str) -> Option<i64> {
|
||||
.output()
|
||||
.await
|
||||
.ok()
|
||||
.map(|inner| {
|
||||
.and_then(|inner| {
|
||||
if inner.status.success() {
|
||||
Some(from_utf8(&*inner.stdout).unwrap().parse::<i64>().unwrap())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.flatten()
|
||||
.map(|inner| if inner < 0 { None } else { Some(inner) })
|
||||
.flatten()
|
||||
.and_then(|inner| if inner < 0 { None } else { Some(inner) })
|
||||
}
|
||||
Reference in new issue
Block a user