@@ -53,11 +53,11 @@ impl Storage for MapStorage {
5353 Ok ( ( ) )
5454 }
5555
56- async fn get ( & mut self , key : & DbKey ) -> PatriciaStorageResult < Option < DbValue > > {
56+ async fn get ( & self , key : & DbKey ) -> PatriciaStorageResult < Option < DbValue > > {
5757 Ok ( self . 0 . get ( key) . cloned ( ) )
5858 }
5959
60- async fn mget ( & mut self , keys : & [ & DbKey ] ) -> PatriciaStorageResult < Vec < Option < DbValue > > > {
60+ async fn mget ( & self , keys : & [ & DbKey ] ) -> PatriciaStorageResult < Vec < Option < DbValue > > > {
6161 Ok ( keys. iter ( ) . map ( |key| self . 0 . get ( key) . cloned ( ) ) . collect ( ) )
6262 }
6363
@@ -227,7 +227,7 @@ impl<S: Storage> Storage for CachedStorage<S> {
227227 type Stats = CachedStorageStats < S :: Stats > ;
228228 type Config = CachedStorageConfig < S :: Config > ;
229229
230- async fn get ( & mut self , key : & DbKey ) -> PatriciaStorageResult < Option < DbValue > > {
230+ async fn get ( & self , key : & DbKey ) -> PatriciaStorageResult < Option < DbValue > > {
231231 if let Some ( cached_value) = self . cache . peek ( key) {
232232 self . reads . fetch_add ( 1 , Ordering :: Relaxed ) ;
233233 return Ok ( cached_value. clone ( ) ) ;
@@ -245,7 +245,7 @@ impl<S: Storage> Storage for CachedStorage<S> {
245245 Ok ( ( ) )
246246 }
247247
248- async fn mget ( & mut self , keys : & [ & DbKey ] ) -> PatriciaStorageResult < Vec < Option < DbValue > > > {
248+ async fn mget ( & self , keys : & [ & DbKey ] ) -> PatriciaStorageResult < Vec < Option < DbValue > > > {
249249 let mut values = vec ! [ None ; keys. len( ) ] ; // The None values are placeholders.
250250 let mut keys_to_fetch = Vec :: new ( ) ;
251251 let mut indices_to_fetch = Vec :: new ( ) ;
0 commit comments