Remove with_store

pull/1860/head
Tony 8 months ago
parent 1498eb5404
commit 02d077ea3b
No known key found for this signature in database
GPG Key ID: 34BDD3EA27824956

@ -442,12 +442,12 @@ impl<R: Runtime> Resource for Store<R> {
} }
impl<R: Runtime> Store<R> { impl<R: Runtime> Store<R> {
/// Do something with the inner store, // /// Do something with the inner store,
/// useful for batching some work if you need higher performance // /// useful for batching some work if you need higher performance
pub fn with_store<T>(&self, f: impl FnOnce(&mut StoreInner<R>) -> T) -> T { // pub fn with_store<T>(&self, f: impl FnOnce(&mut StoreInner<R>) -> T) -> T {
let mut store = self.store.lock().unwrap(); // let mut store = self.store.lock().unwrap();
f(&mut store) // f(&mut store)
} // }
/// Inserts a key-value pair into the store. /// Inserts a key-value pair into the store.
pub fn set(&self, key: impl Into<String>, value: impl Into<JsonValue>) { pub fn set(&self, key: impl Into<String>, value: impl Into<JsonValue>) {

Loading…
Cancel
Save