From 7d09d7217596ecbf7ea1560b1be707bda5a41263 Mon Sep 17 00:00:00 2001 From: daladim Date: Thu, 4 Nov 2021 09:01:25 +0100 Subject: [PATCH] SyncEvent is more usable --- src/provider/sync_progress.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/provider/sync_progress.rs b/src/provider/sync_progress.rs index 7e454fa..d27c51e 100644 --- a/src/provider/sync_progress.rs +++ b/src/provider/sync_progress.rs @@ -3,6 +3,7 @@ use std::fmt::{Display, Error, Formatter}; /// An event that happens during a sync +#[derive(Clone, Debug)] pub enum SyncEvent { /// Sync has not started NotStarted, @@ -18,8 +19,8 @@ impl Display for SyncEvent { fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> { match self { SyncEvent::NotStarted => write!(f, "Not started"), - SyncEvent::Started => write!(f, "Sync has started"), - SyncEvent::InProgress{calendar, details} => write!(f, "[{}] {}", calendar, details), + SyncEvent::Started => write!(f, "Sync has started..."), + SyncEvent::InProgress{calendar, details} => write!(f, "[{}] {}...", calendar, details), SyncEvent::Finished{success} => match success { true => write!(f, "Sync successfully finished"), false => write!(f, "Sync finished with errors"),