File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
storage/provider/src/providers/database Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ impl IntegerList {
3535 /// Returns an error if the list is empty or not pre-sorted.
3636 pub fn new < T : AsRef < [ u64 ] > > ( list : T ) -> Result < Self , RoaringBitmapError > {
3737 Ok ( Self (
38- RoaringTreemap :: from_sorted_iter ( list. as_ref ( ) . into_iter ( ) . copied ( ) )
38+ RoaringTreemap :: from_sorted_iter ( list. as_ref ( ) . iter ( ) . copied ( ) )
3939 . map_err ( |_| RoaringBitmapError :: InvalidInput ) ?,
4040 ) )
4141 }
@@ -47,7 +47,7 @@ impl IntegerList {
4747 /// Panics if the list is empty or not pre-sorted.
4848 pub fn new_pre_sorted < T : AsRef < [ u64 ] > > ( list : T ) -> Self {
4949 Self (
50- RoaringTreemap :: from_sorted_iter ( list. as_ref ( ) . into_iter ( ) . copied ( ) )
50+ RoaringTreemap :: from_sorted_iter ( list. as_ref ( ) . iter ( ) . copied ( ) )
5151 . expect ( "IntegerList must be pre-sorted and non-empty" ) ,
5252 )
5353 }
@@ -139,7 +139,7 @@ impl<'a> Arbitrary<'a> for IntegerList {
139139 fn arbitrary ( u : & mut Unstructured < ' a > ) -> Result < Self , arbitrary:: Error > {
140140 let mut nums: Vec < u64 > = Vec :: arbitrary ( u) ?;
141141 nums. sort ( ) ;
142- Ok ( Self :: new ( nums) . map_err ( |_| arbitrary:: Error :: IncorrectFormat ) ? )
142+ Self :: new ( nums) . map_err ( |_| arbitrary:: Error :: IncorrectFormat )
143143 }
144144}
145145
Original file line number Diff line number Diff line change @@ -790,7 +790,7 @@ impl<TX: DbTxMut + DbTx> DatabaseProvider<TX> {
790790 let mut chunks = chunks. into_iter ( ) . peekable ( ) ;
791791 while let Some ( list) = chunks. next ( ) {
792792 let highest_block_number = if chunks. peek ( ) . is_some ( ) {
793- * list. last ( ) . expect ( "`chunks` does not return empty list" ) as u64
793+ * list. last ( ) . expect ( "`chunks` does not return empty list" )
794794 } else {
795795 // Insert last list with u64::MAX
796796 u64:: MAX
You can’t perform that action at this time.
0 commit comments