(de: D)
| 11 | } |
| 12 | |
| 13 | pub fn deserialize<'de, D: Deserializer<'de>>(de: D) -> Result<Duration, D::Error> { |
| 14 | // TODO: `toml` chokes if we try to derserialize to `&str` here. |
| 15 | let s = String::deserialize(de)?; |
| 16 | humantime::parse_duration(&s).map_err(serde::de::Error::custom) |
| 17 | } |
| 18 | } |
searching dependent graphs…