Skip to content

Commit

Permalink
chore: Remove use of mut where necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
ethenotethan committed Jun 4, 2024
1 parent dd6c253 commit d166f44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit d166f44

Please sign in to comment.