File tree 2 files changed +2
-12
lines changed
2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -116,12 +116,7 @@ where
116
116
conf. max_array_width,
117
117
) ) ) ;
118
118
}
119
- if !kvs. windows ( 2 ) . all ( |window| {
120
- let [ a, b] = window else {
121
- panic ! ( "invalid window length" )
122
- } ;
123
- a. key ( ) < b. key ( )
124
- } ) {
119
+ if !kvs. is_sorted_by ( |a, b| a. key ( ) < b. key ( ) ) {
125
120
return Err ( Error :: Dynamic ( anyhow:: anyhow!(
126
121
"duplicate or unsorted keys in bucket"
127
122
) ) ) ;
Original file line number Diff line number Diff line change @@ -102,12 +102,7 @@ where
102
102
conf. max_array_width,
103
103
) ) ) ;
104
104
}
105
- if !kvs. windows ( 2 ) . all ( |window| {
106
- let [ a, b] = window else {
107
- panic ! ( "invalid window length" )
108
- } ;
109
- a. key ( ) < b. key ( )
110
- } ) {
105
+ if !kvs. is_sorted_by ( |a, b| a. key ( ) < b. key ( ) ) {
111
106
return Err ( Error :: Dynamic ( anyhow:: anyhow!(
112
107
"duplicate or unsorted keys in bucket"
113
108
) ) ) ;
You can’t perform that action at this time.
0 commit comments