We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25c0f91 commit 638e74fCopy full SHA for 638e74f
‎zbus/src/object_server/interface/interface_ref.rs‎
@@ -25,10 +25,6 @@ where
25
pub async fn get(&self) -> InterfaceDeref<'_, I> {
26
let iface = self.lock.read().await;
27
28
- iface
29
- .downcast_ref::<I>()
30
- .expect("Unexpected interface type");
31
-
32
InterfaceDeref {
33
iface,
34
phantom: PhantomData,
@@ -80,14 +76,7 @@ where
80
76
/// # Ok::<_, Box<dyn Error + Send + Sync>>(())
81
77
/// ```
82
78
pub async fn get_mut(&self) -> InterfaceDerefMut<'_, I> {
83
- let mut iface = self.lock.write().await;
84
85
86
87
88
89
- .downcast_mut::<I>()
90
79
+ let iface = self.lock.write().await;
91
92
InterfaceDerefMut {
93
0 commit comments