From dba27b4402648b6a9272cda681ab8caaeb5d279d Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 25 Oct 2022 21:51:46 +0200 Subject: refactor: add Debug implementations for castable factories --- src/interfaces/any_factory.rs | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'src/interfaces') diff --git a/src/interfaces/any_factory.rs b/src/interfaces/any_factory.rs index 1bf9208..e47018b 100644 --- a/src/interfaces/any_factory.rs +++ b/src/interfaces/any_factory.rs @@ -5,23 +5,7 @@ use std::fmt::Debug; use crate::libs::intertrait::{CastFrom, CastFromSync}; /// Interface for any factory to ever exist. -pub trait AnyFactory: CastFrom {} - -impl Debug for dyn AnyFactory -{ - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result - { - f.write_str("{}") - } -} +pub trait AnyFactory: CastFrom + Debug {} /// Interface for any threadsafe factory to ever exist. -pub trait AnyThreadsafeFactory: CastFromSync {} - -impl Debug for dyn AnyThreadsafeFactory -{ - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result - { - f.write_str("{}") - } -} +pub trait AnyThreadsafeFactory: CastFromSync + Debug {} -- cgit v1.2.3-18-g5258