aboutsummaryrefslogtreecommitdiff
path: root/src/statistics/trackers.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-04-04 13:33:45 +0200
committerDaniel Schadt <kingdread@gmx.de>2020-04-04 13:54:10 +0200
commit9ebed9c42dd10bf7bef396a27edd2baa0619dd61 (patch)
tree7541884f56a873e14600df1ea2a43b57a462dd5f /src/statistics/trackers.rs
parent9a1b5445679acc7034a3540e6b58b543941102a2 (diff)
downloadevtclib-9ebed9c42dd10bf7bef396a27edd2baa0619dd61.tar.gz
evtclib-9ebed9c42dd10bf7bef396a27edd2baa0619dd61.tar.bz2
evtclib-9ebed9c42dd10bf7bef396a27edd2baa0619dd61.zip
Insert dyn for trait objects
This was a change in Rust a while back, so we're updating to the new, non-deprecated syntax.
Diffstat (limited to 'src/statistics/trackers.rs')
-rw-r--r--src/statistics/trackers.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/statistics/trackers.rs b/src/statistics/trackers.rs
index 98915d2..16cb755 100644
--- a/src/statistics/trackers.rs
+++ b/src/statistics/trackers.rs
@@ -64,12 +64,12 @@ pub trait Tracker {
/// if you plan on getting any data.
pub trait RunnableTracker {
/// See `Tracker.feed()`. Renamed to avoid conflicts.
- fn run_feed(&mut self, event: &Event) -> Result<(), Box<Error>>;
+ fn run_feed(&mut self, event: &Event) -> Result<(), Box<dyn Error>>;
}
impl<S, E: Error + 'static, T: Tracker<Stat = S, Error = E>> RunnableTracker for T {
- fn run_feed(&mut self, event: &Event) -> Result<(), Box<Error>> {
- self.feed(event).map_err(|e| Box::new(e) as Box<Error>)
+ fn run_feed(&mut self, event: &Event) -> Result<(), Box<dyn Error>> {
+ self.feed(event).map_err(|e| Box::new(e) as Box<dyn Error>)
}
}