From f0ccda7d7402c532bce560fe743c07d1444b80ce Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Mon, 13 Sep 2021 23:21:23 -0300 Subject: Ditch Duration in DataSourceBase --- src/data.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/data.rs') diff --git a/src/data.rs b/src/data.rs index 75ce565..abce42e 100644 --- a/src/data.rs +++ b/src/data.rs @@ -22,7 +22,6 @@ use std::error; use std::hash::Hash; -use std::time::Duration; pub mod effective; pub mod kinds; @@ -35,10 +34,7 @@ mod tests; /// A source of data. pub trait DataSourceBase: std::fmt::Display { /// Refreshes the data associated with this source. - fn update(&mut self) -> ( - Option, - Result<(), Box>, - ); + fn update(&mut self) -> Update; /// Returns whether this data source contains any (valid) data. /// @@ -93,8 +89,6 @@ pub trait OverridableKind: Kind { /// Stats about an update. #[derive(Default)] pub struct Update { - /// Time until next refresh, if known. - pub refresh: Option, /// Errors collected in an update. pub errors: Vec>, } -- cgit 1.4.1