Skip to content

Commit c0a0fc9

Browse files
authored
fix: add pub keyword for public methods (#25)
1 parent c63a2fe commit c0a0fc9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib.nr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl<let MaxPaddedBytes: u32, let PaddedChunksMinusOne: u32, let MaxBytes: u32>
8484
* @brief construct a SubString object from an input byte array
8585
* @details the input byte array must have a number of bytes less than or equal to MaxBytes
8686
**/
87-
fn new<let InputBytes: u32>(input: [u8; InputBytes], input_length: u32) -> Self {
87+
pub fn new<let InputBytes: u32>(input: [u8; InputBytes], input_length: u32) -> Self {
8888
assert(MaxBytes <= MaxPaddedBytes);
8989
assert(input_length <= MaxBytes);
9090
assert(InputBytes <= MaxBytes);
@@ -100,7 +100,7 @@ impl<let MaxPaddedBytes: u32, let PaddedChunksMinusOne: u32, let MaxBytes: u32>
100100
* @details each SubString can have different MaxBytes sizes, however we need OtherBytes <= MaxBytes
101101
* (use concat_into for cases where this is not the case)
102102
**/
103-
fn concat<let OtherPaddedBytes: u32, let OtherPaddedChunks: u32, let OtherMaxBytes: u32>(
103+
pub fn concat<let OtherPaddedBytes: u32, let OtherPaddedChunks: u32, let OtherMaxBytes: u32>(
104104
self,
105105
other: SubString<OtherPaddedBytes, OtherPaddedChunks, OtherMaxBytes>,
106106
) -> Self {
@@ -127,7 +127,7 @@ impl<let MaxPaddedBytes: u32, let PaddedChunksMinusOne: u32, let MaxBytes: u32>
127127
* @details each SubString can have different MaxBytes sizes, however we need MaxBytes <= OtherBytes
128128
* (use concat for cases where this is not the case)
129129
**/
130-
fn concat_into<let OtherPaddedBytes: u32, let OtherPaddedChunks: u32, let OtherMaxBytes: u32>(
130+
pub fn concat_into<let OtherPaddedBytes: u32, let OtherPaddedChunks: u32, let OtherMaxBytes: u32>(
131131
self,
132132
other: SubString<OtherPaddedBytes, OtherPaddedChunks, OtherMaxBytes>,
133133
) -> SubString<OtherPaddedBytes, OtherPaddedChunks, OtherMaxBytes> {
@@ -213,7 +213,7 @@ impl<let MaxPaddedBytes: u32, let PaddedChunks: u32, let MaxBytes: u32> StringBo
213213
* @brief construct a StringBody object from an input byte array
214214
* @details the input byte array must have a number of bytes less than or equal to MaxBytes
215215
**/
216-
fn new<let InputBytes: u32>(data: [u8; InputBytes], length: u32) -> Self {
216+
pub fn new<let InputBytes: u32>(data: [u8; InputBytes], length: u32) -> Self {
217217
assert(length <= MaxBytes);
218218
assert(length <= InputBytes);
219219
let mut body: [u8; MaxPaddedBytes] = [0; MaxPaddedBytes];
@@ -226,7 +226,7 @@ impl<let MaxPaddedBytes: u32, let PaddedChunks: u32, let MaxBytes: u32> StringBo
226226
/**
227227
* @brief Validate a substring exists in the StringBody. Returns a success flag and the position within the StringBody that the match was found
228228
**/
229-
fn substring_match<NeedleSubString>(self, substring: NeedleSubString) -> (bool, u32)
229+
pub fn substring_match<NeedleSubString>(self, substring: NeedleSubString) -> (bool, u32)
230230
where
231231
NeedleSubString: SubStringTrait,
232232
{

0 commit comments

Comments
 (0)