Skip to content

Commit 5f3a49e

Browse files
authored
fix: fix visibility issues (#16)
1 parent 043b8e9 commit 5f3a49e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/lib.nr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ where
5959
/**
6060
* @brief construct a SparseArray
6161
**/
62-
fn create(_keys: [Field; N], _values: [T; N], size: Field) -> Self {
62+
pub(crate) fn create(_keys: [Field; N], _values: [T; N], size: Field) -> Self {
6363
let _maximum = size - 1;
6464
let mut r: Self =
6565
SparseArray { keys: [0; N + 2], values: [T::default(); N + 3], maximum: _maximum };
@@ -167,7 +167,7 @@ where
167167

168168
mod test {
169169

170-
use crate::SparseArray;
170+
use super::SparseArray;
171171
#[test]
172172
fn test_sparse_lookup() {
173173
let example = SparseArray::create([1, 99, 7, 5], [123, 101112, 789, 456], 100);

src/mut_sparse_array.nr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use dep::sort::sort_advanced;
21
use crate::{MutSparseArray, MutSparseArrayBase, U32RangeTraits};
2+
use dep::sort::sort_advanced;
33
unconstrained fn __sort_field_as_u32(lhs: Field, rhs: Field) -> bool {
44
lhs as u32 < rhs as u32
55
}
@@ -62,7 +62,7 @@ where
6262
ComparisonFuncs: RangeTraits,
6363
{
6464

65-
fn create<let M: u32>(_keys: [Field; M], _values: [T; M], size: Field) -> Self {
65+
pub(crate) fn create<let M: u32>(_keys: [Field; M], _values: [T; M], size: Field) -> Self {
6666
assert(M <= N);
6767
let _maximum = size - 1;
6868
let mut r: Self = MutSparseArrayBase {
@@ -241,7 +241,7 @@ impl<let N: u32, T> MutSparseArray<N, T>
241241
where
242242
T: std::default::Default,
243243
{
244-
fn create<let M: u32>(_keys: [Field; M], _values: [T; M], size: Field) -> Self {
244+
pub(crate) fn create<let M: u32>(_keys: [Field; M], _values: [T; M], size: Field) -> Self {
245245
Self { inner: MutSparseArrayBase::create(_keys, _values, size) }
246246
}
247247

0 commit comments

Comments
 (0)