diff options
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/mod.rs b/src/api/mod.rs index 27f0da1..ffed5ea 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -123,7 +123,7 @@ impl Api { P: AsRef<Path>, { match self.cache.get(name.as_ref())? { - Some(data) => Ok(serde_json::from_slice(&data)?), + Some(data) => serde_json::from_slice(&data).or(Ok(None)), None => Ok(None), } } |