diff options
| author | HampusM <hampus@hampusmat.com> | 2023-08-20 17:01:12 +0200 | 
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2023-08-20 17:01:12 +0200 | 
| commit | 0b4232d343e2214ead8fa62583bff2e948173ddf (patch) | |
| tree | f809051c9933a132971ab91244e83d1f9d387ad6 /src/errors | |
| parent | be2c39b452b8b1e024300caff1ce8f11d54b27ce (diff) | |
feat: expose DI container get_bound methods to public API
Diffstat (limited to 'src/errors')
| -rw-r--r-- | src/errors/di_container.rs | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/src/errors/di_container.rs b/src/errors/di_container.rs index 311917a..7e29ffa 100644 --- a/src/errors/di_container.rs +++ b/src/errors/di_container.rs @@ -38,7 +38,7 @@ pub enum DIContainerError      /// No binding exists for a interface (and optionally a name).      #[error(          "No binding exists for interface '{interface}' {}", -        .name.map_or_else(String::new, |name| format!("with name '{name}'")) +        name.as_ref().map(|name| format!("with name '{name}'")).unwrap_or_default()      )]      BindingNotFound      { @@ -46,7 +46,7 @@ pub enum DIContainerError          interface: &'static str,          /// The name of the binding if one exists. -        name: Option<&'static str>, +        name: Option<String>,      },  }  | 
