summary refs log tree commit diff stats
path: root/src/data.rs
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2021-09-13 23:21:23 -0300
committerSoniEx2 <endermoneymod@gmail.com>2021-09-13 23:21:23 -0300
commitf0ccda7d7402c532bce560fe743c07d1444b80ce (patch)
tree58f10b8b277a9f393a5b9e7b113d4a58ac6726ee /src/data.rs
parent22e7a62e9529cc4a59941e8342f69d0f6ded60f9 (diff)
Ditch Duration in DataSourceBase rustgan
Diffstat (limited to 'src/data.rs')
-rw-r--r--src/data.rs8
1 files changed, 1 insertions, 7 deletions
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<Duration>,
-        Result<(), Box<dyn error::Error + Send + Sync + 'static>>,
-    );
+    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<Duration>,
     /// Errors collected in an update.
     pub errors: Vec<Box<dyn error::Error + Send + Sync + 'static>>,
 }