aboutsummaryrefslogtreecommitdiff
path: root/src/errors/di_container.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/errors/di_container.rs')
-rw-r--r--src/errors/di_container.rs4
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>,
},
}