diff --git a/src/store/mod.rs b/src/store/mod.rs index 1170ec4..235011b 100644 --- a/src/store/mod.rs +++ b/src/store/mod.rs @@ -27,7 +27,7 @@ impl MessageBrokerStore { self.data .write() .map_err(|_| "Could not acquire data write lock") - .and_then(|mut data| Ok(data.entry(subject).or_insert_with(HashSet::new).insert(sub))) + .map(|mut data| data.entry(subject).or_insert_with(HashSet::new).insert(sub)) } pub fn remove_subscription(