diff options
author | HampusM <hampus@hampusmat.com> | 2023-08-31 19:19:06 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-08-31 19:19:06 +0200 |
commit | 7bed48c852a741df5a14359916faf21d90d39814 (patch) | |
tree | 5cc94835225d356ed658cf78a99deeb1b4e730f8 /src/di_container/mod.rs | |
parent | 0b4232d343e2214ead8fa62583bff2e948173ddf (diff) |
refactor: pass around BindingOptions instead of name
Diffstat (limited to 'src/di_container/mod.rs')
-rw-r--r-- | src/di_container/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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 } } |