Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove use of mut where necessary #8

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/blob_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ mod tests {

#[test]
fn test_is_empty() {
let mut blob_empty = Blob::from_bytes_and_pad("".as_bytes());
let blob_empty = Blob::from_bytes_and_pad("".as_bytes());
assert!(blob_empty.is_empty(), "blob should be empty");

let mut blob = Blob::from_bytes_and_pad("hi".as_bytes());
let blob = Blob::from_bytes_and_pad("hi".as_bytes());
assert!(!blob.is_empty(), "blob should not be empty");
}

#[test]
fn test_from_padded_bytes_unchecked() {
let mut blob = Blob::from_bytes_and_pad("hi".as_bytes());
let mut blob_unchecked = Blob::from_padded_bytes_unchecked(blob.get_blob_data().as_slice());
let blob = Blob::from_bytes_and_pad("hi".as_bytes());
let blob_unchecked = Blob::from_padded_bytes_unchecked(blob.get_blob_data().as_slice());

assert_eq!(blob, blob_unchecked, "blob should be equal");
}
Expand Down
4 changes: 2 additions & 2 deletions tests/polynomial_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ mod tests {

#[test]
fn test_transform_form() {
let mut blob = Blob::from_bytes_and_pad(
let blob = Blob::from_bytes_and_pad(
vec![
42, 212, 238, 227, 192, 237, 178, 128, 19, 108, 50, 204, 87, 81, 63, 120, 232, 27,
116, 108, 74, 168, 109, 84, 89, 9, 6, 233, 144, 200, 125, 40,
Expand Down Expand Up @@ -112,7 +112,7 @@ mod tests {
"start and finish bytes should be the same"
);

let mut long_blob = Blob::from_bytes_and_pad(GETTYSBURG_ADDRESS_BYTES);
let long_blob = Blob::from_bytes_and_pad(GETTYSBURG_ADDRESS_BYTES);
let mut long_poly = long_blob
.to_polynomial(PolynomialFormat::InCoefficientForm)
.unwrap();
Expand Down