From bd38d2258b466b69fc20513a9d5b25c71724f4c4 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Fri, 30 Aug 2024 17:45:06 +0200 Subject: [PATCH] persistence: fix invalid interface abtreaction in MemStash::impl_for Closes #263 --- src/persistence/memory.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/persistence/memory.rs b/src/persistence/memory.rs index b017263a..b2cdc187 100644 --- a/src/persistence/memory.rs +++ b/src/persistence/memory.rs @@ -192,8 +192,8 @@ impl StashReadProvider for MemStash { .values() .find(|iimpl| C::IFACE_IDS.contains(&iimpl.iface_id)) .or_else(|| { - schema_ifaces.iimpls.keys().find_map(|id| { - let iface = self.iface(id.clone()).ok()?; + C::IFACE_IDS.iter().find_map(|id| { + let iface = self.iface(*id).ok()?; iface.find_abstractable_impl(schema_ifaces) }) })