aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/any_factory.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-10-25 21:51:46 +0200
committerHampusM <hampus@hampusmat.com>2022-10-25 21:51:46 +0200
commitdba27b4402648b6a9272cda681ab8caaeb5d279d (patch)
treec7044883595aa706cab508175bcb99e9f4bfc492 /src/interfaces/any_factory.rs
parent8c6431fd834337be7f6b88e3c8a29c6a17e0b9cf (diff)
refactor: add Debug implementations for castable factories
Diffstat (limited to 'src/interfaces/any_factory.rs')
-rw-r--r--src/interfaces/any_factory.rs20
1 files changed, 2 insertions, 18 deletions
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 {}