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/effective | |
parent | 22e7a62e9529cc4a59941e8342f69d0f6ded60f9 (diff) |
Ditch Duration in DataSourceBase rustgan
Diffstat (limited to 'src/data/effective')
-rw-r--r-- | src/data/effective/tests.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/data/effective/tests.rs b/src/data/effective/tests.rs index dab503f..9d0a21f 100644 --- a/src/data/effective/tests.rs +++ b/src/data/effective/tests.rs @@ -17,8 +17,6 @@ //! Unit tests for the effective module. use std::collections::BTreeSet; -use std::error; -use std::time::Duration; use impl_trait::impl_trait; use url::Url; @@ -26,6 +24,7 @@ use url::Url; use crate::data::{ DataSource, DataSourceBase, + Update, }; use crate::data::kinds::{ InstanceBaseUrl, @@ -40,13 +39,10 @@ struct EffectiveTester; impl_trait! { impl EffectiveTester { - /// 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 { |