diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2021-09-13 23:21:23 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2021-09-13 23:21:23 -0300 |
commit | f0ccda7d7402c532bce560fe743c07d1444b80ce (patch) | |
tree | 58f10b8b277a9f393a5b9e7b113d4a58ac6726ee /src/data/sources/defaults.rs | |
parent | 22e7a62e9529cc4a59941e8342f69d0f6ded60f9 (diff) |
Ditch Duration in DataSourceBase rustgan
Diffstat (limited to 'src/data/sources/defaults.rs')
-rw-r--r-- | src/data/sources/defaults.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/data/sources/defaults.rs b/src/data/sources/defaults.rs index e8ffa33..7db9e48 100644 --- a/src/data/sources/defaults.rs +++ b/src/data/sources/defaults.rs @@ -17,8 +17,6 @@ //! Data source for compile-time defaults. use std::collections::BTreeSet; -use std::error; -use std::time::Duration; use impl_trait::impl_trait; @@ -31,6 +29,7 @@ use super::super::kinds::{ ProjectFork, RepoListUrl, }; +use super::super::Update; /// Data source that provides compile-time defaults. /// @@ -49,13 +48,10 @@ pub struct DefaultsDataSource; impl_trait! { impl DefaultsDataSource { - /// Always updates successfully, with an unknown refresh interval. + /// Always updates with no stats. impl trait DataSourceBase { - fn update(&mut self) -> ( - Option<Duration>, - Result<(), Box<dyn error::Error + Send + Sync + 'static>>, - ) { - (None, Ok(())) + fn update(&mut self) -> Update { + Update::default() } fn exists(&self) -> bool { |