From d6f01bd571753dc2e9628418f94f66139438bcb3 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 30 Aug 2022 18:53:23 +0200 Subject: refactor: replace arc cast panic with an error --- src/errors/async_di_container.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/errors') diff --git a/src/errors/async_di_container.rs b/src/errors/async_di_container.rs index 4f5e50a..bdb6fa0 100644 --- a/src/errors/async_di_container.rs +++ b/src/errors/async_di_container.rs @@ -43,6 +43,10 @@ pub enum AsyncDIContainerError /// The name of the binding if one exists. name: Option<&'static str>, }, + + /// A interface has not been marked async. + #[error("Interface '{0}' has not been marked async")] + InterfaceNotAsync(&'static str), } /// Error type for [`AsyncBindingBuilder`]. -- cgit v1.2.3-18-g5258