@@ -105,28 +105,28 @@ impl TopStateView for TopLevelState {
105105 fn account ( & self , a : & Address ) -> TrieResult < Option < Account > > {
106106 let db = self . db . borrow ( ) ;
107107 let trie = TrieFactory :: readonly ( db. as_hashdb ( ) , & self . root ) ?;
108- self . top_cache . account ( & a, & * trie)
108+ self . top_cache . account ( & a, & trie)
109109 }
110110
111111 fn regular_account_by_address ( & self , a : & Address ) -> TrieResult < Option < RegularAccount > > {
112112 let a = RegularAccountAddress :: from_address ( a) ;
113113 let db = self . db . borrow ( ) ;
114114 let trie = TrieFactory :: readonly ( db. as_hashdb ( ) , & self . root ) ?;
115- Ok ( self . top_cache . regular_account ( & a, & * trie) ?)
115+ Ok ( self . top_cache . regular_account ( & a, & trie) ?)
116116 }
117117
118118 fn metadata ( & self ) -> TrieResult < Option < Metadata > > {
119119 let db = self . db . borrow ( ) ;
120120 let trie = TrieFactory :: readonly ( db. as_hashdb ( ) , & self . root ) ?;
121121 let address = MetadataAddress :: new ( ) ;
122- self . top_cache . metadata ( & address, & * trie)
122+ self . top_cache . metadata ( & address, & trie)
123123 }
124124
125125 fn shard ( & self , shard_id : ShardId ) -> TrieResult < Option < Shard > > {
126126 let db = self . db . borrow ( ) ;
127127 let trie = TrieFactory :: readonly ( db. as_hashdb ( ) , & self . root ) ?;
128128 let shard_address = ShardAddress :: new ( shard_id) ;
129- self . top_cache . shard ( & shard_address, & * trie)
129+ self . top_cache . shard ( & shard_address, & trie)
130130 }
131131
132132 fn shard_state < ' db > ( & ' db self , shard_id : ShardId ) -> TrieResult < Option < Box < dyn ShardStateView + ' db > > > {
@@ -143,13 +143,13 @@ impl TopStateView for TopLevelState {
143143 fn text ( & self , key : & H256 ) -> TrieResult < Option < Text > > {
144144 let db = self . db . borrow ( ) ;
145145 let trie = TrieFactory :: readonly ( db. as_hashdb ( ) , & self . root ) ?;
146- Ok ( self . top_cache . text ( key, & * trie) ?. map ( Into :: into) )
146+ Ok ( self . top_cache . text ( key, & trie) ?. map ( Into :: into) )
147147 }
148148
149149 fn action_data ( & self , key : & H256 ) -> TrieResult < Option < ActionData > > {
150150 let db = self . db . borrow ( ) ;
151151 let trie = TrieFactory :: readonly ( db. as_hashdb ( ) , & self . root ) ?;
152- Ok ( self . top_cache . action_data ( key, & * trie) ?. map ( Into :: into) )
152+ Ok ( self . top_cache . action_data ( key, & trie) ?. map ( Into :: into) )
153153 }
154154}
155155
@@ -173,14 +173,14 @@ impl StateWithCache for TopLevelState {
173173
174174 let shard_cache = self . shard_caches . get_mut ( & shard_id) . expect ( "Shard must exist" ) ;
175175
176- shard_cache. commit ( & mut * trie) ?;
176+ shard_cache. commit ( & mut trie) ?;
177177 }
178178 self . set_shard_root ( shard_id, shard_root) ?;
179179 }
180180 {
181181 let mut db = self . db . borrow_mut ( ) ;
182182 let mut trie = TrieFactory :: from_existing ( db. as_hashdb_mut ( ) , & mut self . root ) ?;
183- self . top_cache . commit ( & mut * trie) ?;
183+ self . top_cache . commit ( & mut trie) ?;
184184 }
185185 Ok ( self . root )
186186 }
@@ -636,46 +636,46 @@ impl TopLevelState {
636636
637637 let db = self . db . borrow ( ) ;
638638 let trie = TrieFactory :: readonly ( db. as_hashdb ( ) , & self . root ) ?;
639- self . top_cache . account_mut ( & a, & * trie)
639+ self . top_cache . account_mut ( & a, & trie)
640640 }
641641
642642 fn get_regular_account_mut ( & self , public : & Public ) -> TrieResult < RefMut < RegularAccount > > {
643643 let regular_account_address = RegularAccountAddress :: new ( public) ;
644644 let db = self . db . borrow ( ) ;
645645 let trie = TrieFactory :: readonly ( db. as_hashdb ( ) , & self . root ) ?;
646- self . top_cache . regular_account_mut ( & regular_account_address, & * trie)
646+ self . top_cache . regular_account_mut ( & regular_account_address, & trie)
647647 }
648648
649649 fn get_metadata_mut ( & self ) -> TrieResult < RefMut < Metadata > > {
650650 let db = self . db . borrow ( ) ;
651651 let trie = TrieFactory :: readonly ( db. as_hashdb ( ) , & self . root ) ?;
652652 let address = MetadataAddress :: new ( ) ;
653- self . top_cache . metadata_mut ( & address, & * trie)
653+ self . top_cache . metadata_mut ( & address, & trie)
654654 }
655655
656656 fn get_shard_mut ( & self , shard_id : ShardId ) -> TrieResult < RefMut < Shard > > {
657657 let db = self . db . borrow ( ) ;
658658 let trie = TrieFactory :: readonly ( db. as_hashdb ( ) , & self . root ) ?;
659659 let shard_address = ShardAddress :: new ( shard_id) ;
660- self . top_cache . shard_mut ( & shard_address, & * trie)
660+ self . top_cache . shard_mut ( & shard_address, & trie)
661661 }
662662
663663 fn get_text ( & self , key : & TxHash ) -> TrieResult < Option < Text > > {
664664 let db = self . db . borrow ( ) ;
665665 let trie = TrieFactory :: readonly ( db. as_hashdb ( ) , & self . root ) ?;
666- self . top_cache . text ( key, & * trie)
666+ self . top_cache . text ( key, & trie)
667667 }
668668
669669 fn get_text_mut ( & self , key : & TxHash ) -> TrieResult < RefMut < Text > > {
670670 let db = self . db . borrow ( ) ;
671671 let trie = TrieFactory :: readonly ( db. as_hashdb ( ) , & self . root ) ?;
672- self . top_cache . text_mut ( key, & * trie)
672+ self . top_cache . text_mut ( key, & trie)
673673 }
674674
675675 fn get_action_data_mut ( & self , key : & H256 ) -> TrieResult < RefMut < ActionData > > {
676676 let db = self . db . borrow ( ) ;
677677 let trie = TrieFactory :: readonly ( db. as_hashdb ( ) , & self . root ) ?;
678- self . top_cache . action_data_mut ( key, & * trie)
678+ self . top_cache . action_data_mut ( key, & trie)
679679 }
680680
681681 pub fn journal_under ( & self , batch : & mut DBTransaction , now : u64 ) -> Result < u32 , UtilError > {
0 commit comments