|
1 | 1 | use crate::{MutSparseArray, MutSparseArrayBase, U32RangeTraits}; |
2 | 2 | use dep::sort::sort_advanced; |
3 | | -unconstrained fn __sort_field_as_u32(lhs: u32, rhs: u32) -> bool { |
| 3 | +unconstrained fn __sort(lhs: u32, rhs: u32) -> bool { |
4 | 4 | lhs < rhs |
5 | 5 | } |
6 | 6 |
|
|
76 | 76 | // for any valid index, we want to ensure the following is satified: |
77 | 77 | // self.keys[X] <= index <= self.keys[X+1] |
78 | 78 | // this requires us to sort hte keys, and insert a startpoint and endpoint |
79 | | - let sorted_keys = sort_advanced(_keys, __sort_field_as_u32, assert_sorted); |
| 79 | + let sorted_keys = sort_advanced(_keys, __sort, assert_sorted); |
80 | 80 |
|
81 | 81 | // insert start and endpoints |
82 | 82 | r.keys[0] = 0; |
@@ -222,8 +222,8 @@ impl<let N: u32, T> MutSparseArray<N, T> |
222 | 222 | where |
223 | 223 | T: std::default::Default, |
224 | 224 | { |
225 | | - pub(crate) fn create<let M: u32>(_keys: [u32; M], _values: [T; M], size: u32) -> Self { |
226 | | - Self { inner: MutSparseArrayBase::create(_keys, _values, size) } |
| 225 | + pub(crate) fn create<let M: u32>(keys: [u32; M], values: [T; M], size: u32) -> Self { |
| 226 | + Self { inner: MutSparseArrayBase::create(keys, values, size) } |
227 | 227 | } |
228 | 228 |
|
229 | 229 | fn get(self, idx: u32) -> T { |
|
0 commit comments