diff options
Diffstat (limited to 'core/src/utils.rs')
-rw-r--r-- | core/src/utils.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/core/src/utils.rs b/core/src/utils.rs index ebed85b..2d0fd17 100644 --- a/core/src/utils.rs +++ b/core/src/utils.rs @@ -2,15 +2,14 @@ //! //! Contains everything which doesn't has a better place //! to be put in. -use std::marker::Send; use std::fmt::Debug; +use std::marker::Send; use chrono; use futures::Future; - /// Type alias for an boxed future which is Send + 'static. -pub type SendBoxFuture<I, E> = Box<Future<Item=I, Error=E> + Send + 'static>; +pub type SendBoxFuture<I, E> = Box<Future<Item = I, Error = E> + Send + 'static>; /// Returns the current data time. pub fn now() -> chrono::DateTime<chrono::Utc> { @@ -25,9 +24,12 @@ pub trait ConstSwitch: Debug + Copy + Send + Sync + 'static { /// Struct implementing `ConstSwitch` with `ENABLED = true`. #[derive(Debug, Copy, Clone)] pub struct Enabled; -impl ConstSwitch for Enabled { const ENABLED: bool = true; } +impl ConstSwitch for Enabled { + const ENABLED: bool = true; +} /// Struct implementing `ConstSwitch` with `ENABLED = false`. #[derive(Debug, Copy, Clone)] pub struct Disabled; -impl ConstSwitch for Disabled { const ENABLED: bool = false; } - +impl ConstSwitch for Disabled { + const ENABLED: bool = false; +} |