From 7bed48c852a741df5a14359916faf21d90d39814 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 31 Aug 2023 19:19:06 +0200 Subject: refactor: pass around BindingOptions instead of name --- src/di_container/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/di_container/mod.rs') diff --git a/src/di_container/mod.rs b/src/di_container/mod.rs index 63733f5..7e8c11f 100644 --- a/src/di_container/mod.rs +++ b/src/di_container/mod.rs @@ -14,7 +14,7 @@ pub mod blocking; /// # /// BindingOptions::new().name("foo"); /// ``` -#[derive(Debug, Default, Clone)] +#[derive(Debug, Default, Clone, PartialEq, Eq, Hash)] pub struct BindingOptions<'a> { name: Option<&'a str>, @@ -24,7 +24,7 @@ impl<'a> BindingOptions<'a> { /// Returns a new `BindingOptions`. #[must_use] - pub fn new() -> Self + pub const fn new() -> Self { Self { name: None } } -- cgit v1.2.3-18-g5258