From b54dee1fb52f259de8b485d050d75c6956750b7f Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 3 Aug 2022 14:13:55 +0200 Subject: feat!: prevent binding the same interface more than once BREAKING CHANGE: The 'to' and 'to_factory' methods of BindingBuilder now return 'Result' --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index a03675b..89688f1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,7 +40,7 @@ mod provider; #[macro_export] macro_rules! di_container_bind { ($interface: path => $implementation: ty, $di_container: ident) => { - $di_container.bind::().to::<$implementation>(); + $di_container.bind::().to::<$implementation>().unwrap(); syrette::declare_interface!($implementation -> $interface); }; -- cgit v1.2.3-18-g5258