diff options
author | HampusM <hampus@hampusmat.com> | 2022-09-23 21:37:55 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-09-23 21:37:55 +0200 |
commit | 145a257775f2397ceba0941ac2a2642cf3382dcb (patch) | |
tree | 4df0249f767b85d6b08d5c82c678562f8b081f67 | |
parent | 7a68649014d5ff215fe2242ebd200916f2e773c9 (diff) |
refactor: make the async & non-async DI container bind methods must_use
-rw-r--r-- | src/async_di_container.rs | 1 | ||||
-rw-r--r-- | src/di_container.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/async_di_container.rs b/src/async_di_container.rs index 1ead116..7e01c66 100644 --- a/src/async_di_container.rs +++ b/src/async_di_container.rs @@ -402,6 +402,7 @@ impl AsyncDIContainer } /// Returns a new [`AsyncBindingBuilder`] for the given interface. + #[must_use] pub fn bind<Interface>(self: &mut Arc<Self>) -> AsyncBindingBuilder<Interface> where Interface: 'static + ?Sized, diff --git a/src/di_container.rs b/src/di_container.rs index 3adee09..2907969 100644 --- a/src/di_container.rs +++ b/src/di_container.rs @@ -349,6 +349,7 @@ impl DIContainer } /// Returns a new [`BindingBuilder`] for the given interface. + #[must_use] pub fn bind<Interface>(self: &mut Rc<Self>) -> BindingBuilder<Interface> where Interface: 'static + ?Sized, |