@@ -52,11 +52,11 @@ impl Storage for MapStorage {
5252 Ok ( ( ) )
5353 }
5454
55- async fn get ( & mut self , key : & DbKey ) -> PatriciaStorageResult < Option < DbValue > > {
55+ async fn get ( & self , key : & DbKey ) -> PatriciaStorageResult < Option < DbValue > > {
5656 Ok ( self . 0 . get ( key) . cloned ( ) )
5757 }
5858
59- async fn mget ( & mut self , keys : & [ & DbKey ] ) -> PatriciaStorageResult < Vec < Option < DbValue > > > {
59+ async fn mget ( & self , keys : & [ & DbKey ] ) -> PatriciaStorageResult < Vec < Option < DbValue > > > {
6060 Ok ( keys. iter ( ) . map ( |key| self . 0 . get ( key) . cloned ( ) ) . collect ( ) )
6161 }
6262
@@ -222,7 +222,7 @@ impl<S: Storage> Storage for CachedStorage<S> {
222222 type Stats = CachedStorageStats < S :: Stats > ;
223223 type Config = CachedStorageConfig < S :: Config > ;
224224
225- async fn get ( & mut self , key : & DbKey ) -> PatriciaStorageResult < Option < DbValue > > {
225+ async fn get ( & self , key : & DbKey ) -> PatriciaStorageResult < Option < DbValue > > {
226226 if let Some ( cached_value) = self . cache . peek ( key) {
227227 return Ok ( cached_value. clone ( ) ) ;
228228 }
@@ -238,7 +238,7 @@ impl<S: Storage> Storage for CachedStorage<S> {
238238 Ok ( ( ) )
239239 }
240240
241- async fn mget ( & mut self , keys : & [ & DbKey ] ) -> PatriciaStorageResult < Vec < Option < DbValue > > > {
241+ async fn mget ( & self , keys : & [ & DbKey ] ) -> PatriciaStorageResult < Vec < Option < DbValue > > > {
242242 let mut values = vec ! [ None ; keys. len( ) ] ; // The None values are placeholders.
243243 let mut keys_to_fetch = Vec :: new ( ) ;
244244 let mut indices_to_fetch = Vec :: new ( ) ;
0 commit comments