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 {
35
35
/// Returns an error if the list is empty or not pre-sorted.
36
36
pub fn new < T : AsRef < [ u64 ] > > ( list : T ) -> Result < Self , RoaringBitmapError > {
37
37
Ok ( Self (
38
- RoaringTreemap :: from_sorted_iter ( list. as_ref ( ) . into_iter ( ) . copied ( ) )
38
+ RoaringTreemap :: from_sorted_iter ( list. as_ref ( ) . iter ( ) . copied ( ) )
39
39
. map_err ( |_| RoaringBitmapError :: InvalidInput ) ?,
40
40
) )
41
41
}
@@ -47,7 +47,7 @@ impl IntegerList {
47
47
/// Panics if the list is empty or not pre-sorted.
48
48
pub fn new_pre_sorted < T : AsRef < [ u64 ] > > ( list : T ) -> Self {
49
49
Self (
50
- RoaringTreemap :: from_sorted_iter ( list. as_ref ( ) . into_iter ( ) . copied ( ) )
50
+ RoaringTreemap :: from_sorted_iter ( list. as_ref ( ) . iter ( ) . copied ( ) )
51
51
. expect ( "IntegerList must be pre-sorted and non-empty" ) ,
52
52
)
53
53
}
@@ -139,7 +139,7 @@ impl<'a> Arbitrary<'a> for IntegerList {
139
139
fn arbitrary ( u : & mut Unstructured < ' a > ) -> Result < Self , arbitrary:: Error > {
140
140
let mut nums: Vec < u64 > = Vec :: arbitrary ( u) ?;
141
141
nums. sort ( ) ;
142
- Ok ( Self :: new ( nums) . map_err ( |_| arbitrary:: Error :: IncorrectFormat ) ? )
142
+ Self :: new ( nums) . map_err ( |_| arbitrary:: Error :: IncorrectFormat )
143
143
}
144
144
}
145
145
Original file line number Diff line number Diff line change @@ -790,7 +790,7 @@ impl<TX: DbTxMut + DbTx> DatabaseProvider<TX> {
790
790
let mut chunks = chunks. into_iter ( ) . peekable ( ) ;
791
791
while let Some ( list) = chunks. next ( ) {
792
792
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" )
794
794
} else {
795
795
// Insert last list with u64::MAX
796
796
u64:: MAX
You can’t perform that action at this time.
0 commit comments