chiark
/
gitweb
/
~ian
/
hippotat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70380d0
)
config
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 24 Jul 2021 12:50:40 +0000
(13:50 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 24 Jul 2021 12:50:40 +0000
(13:50 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/config.rs
patch
|
blob
|
history
diff --git
a/src/config.rs
b/src/config.rs
index 3eae89d084d916fcb3291164ff59663fb97fb6e1..94c5e1620cadc63ddbc7f5ad33ad955ff424f359 100644
(file)
--- a/
src/config.rs
+++ b/
src/config.rs
@@
-302,9
+302,8
@@
trait Parseable: Sized {
impl Parseable for Duration {
#[throws(AE)]
fn parse(s: Option<&str>) -> Duration {
- let s = s.value()?;
- if let Ok(u64) = s.parse() { return Duration::from_secs(u64) }
- throw!(anyhow!("xxx parse with humantime"))
+ // todo: would be nice to parse with humantime maybe
+ Duration::from_secs( s.value()?.parse()? )
}
}
macro_rules! parseable_from_str { ($t:ty $(, $def:expr)? ) => {