Skip to content

Commit 733f789

Browse files
committed
rename
1 parent 2e637f3 commit 733f789

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/lib.nr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mod mut_sparse_array;
22
use dep::sort::sort_advanced;
33

4-
unconstrained fn __sort_field_as_u32(lhs: u32, rhs: u32) -> bool {
4+
unconstrained fn __sort(lhs: u32, rhs: u32) -> bool {
55
// lhs.lt(rhs)
66
lhs < rhs
77
}
@@ -67,7 +67,7 @@ where
6767
// for any valid index, we want to ensure the following is satified:
6868
// self.keys[X] <= index <= self.keys[X+1]
6969
// this requires us to sort hte keys, and insert a startpoint and endpoint
70-
let sorted_keys = sort_advanced(_keys, __sort_field_as_u32, assert_sorted);
70+
let sorted_keys = sort_advanced(_keys, __sort, assert_sorted);
7171

7272
// insert start and endpoints
7373
r.keys[0] = 0;

src/mut_sparse_array.nr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{MutSparseArray, MutSparseArrayBase, U32RangeTraits};
22
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 {
44
lhs < rhs
55
}
66

@@ -76,7 +76,7 @@ where
7676
// for any valid index, we want to ensure the following is satified:
7777
// self.keys[X] <= index <= self.keys[X+1]
7878
// 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);
8080

8181
// insert start and endpoints
8282
r.keys[0] = 0;
@@ -222,8 +222,8 @@ impl<let N: u32, T> MutSparseArray<N, T>
222222
where
223223
T: std::default::Default,
224224
{
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) }
227227
}
228228

229229
fn get(self, idx: u32) -> T {

0 commit comments

Comments
 (0)