diff --git a/src/data_structures/src/byte_reader.cairo b/src/data_structures/src/byte_reader.cairo index f3194a19..c84a5af1 100644 --- a/src/data_structures/src/byte_reader.cairo +++ b/src/data_structures/src/byte_reader.cairo @@ -3,8 +3,8 @@ use super::bit_array::{one_shift_left_bytes_felt252, one_shift_left_bytes_u128}; #[derive(Copy, Clone, Drop)] pub struct ByteReaderState { - pub data: @T, - pub index: usize, + pub(crate) data: @T, + index: usize, } pub trait ByteReader { diff --git a/src/data_structures/src/tests/byte_reader_test.cairo b/src/data_structures/src/tests/byte_reader_test.cairo index 04998bfc..a35305b3 100644 --- a/src/data_structures/src/tests/byte_reader_test.cairo +++ b/src/data_structures/src/tests/byte_reader_test.cairo @@ -468,9 +468,9 @@ fn test_clone_byte_array_reader() { let mut rd1 = ba.reader(); let mut rd2 = rd1.clone(); let a = rd1.read_u128().unwrap(); - assert!(rd1.index != rd2.index, "indicies equal"); + assert!(rd1.len() != rd2.len(), "indices equal"); let b = rd2.read_u128().unwrap(); - assert!(rd1.index == rd2.index, "indicies not equal"); + assert!(rd1.len() == rd2.len(), "indices not equal"); assert!(a == b, "copy ByteArrayReader failed"); } @@ -481,9 +481,9 @@ fn test_clone_array_of_bytes_reader() { let mut rd1 = ba.reader(); let mut rd2 = rd1.clone(); let a = rd1.read_u128().unwrap(); - assert!(rd1.index != rd2.index, "indicies equal"); + assert!(rd1.len() != rd2.len(), "indices equal"); let b = rd2.read_u128().unwrap(); - assert!(rd1.index == rd2.index, "indicies not equal"); + assert!(rd1.len() == rd2.len(), "indices not equal"); assert!(a == b, "copy ByteArrayReader failed"); }