Skip to content

Commit

Permalink
Merge branch 'main' into v0.8.0-rc
Browse files Browse the repository at this point in the history
  • Loading branch information
rauljordan committed Feb 6, 2025
2 parents 06063e5 + e6f04f9 commit 930a78e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,4 @@ jobs:
toolchain: ${{ matrix.toolchain }}
components: clippy
- name: cargo clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
run: cargo clippy --all-targets --all-features -- -D warnings
4 changes: 3 additions & 1 deletion stylus-sdk/src/abi/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ mod tests {
fn bytes_abi() {
assert_eq!(Bytes::SOL_NAME, "bytes");
assert_eq!(Bytes::ENCODED_SIZE, None);
assert!(Bytes::DYNAMIC);
if !Bytes::DYNAMIC {
panic!();
}
assert_eq!(
<Bytes as SolType>::abi_encoded_size(&Bytes(vec![1, 2, 3, 4])),
64
Expand Down
4 changes: 2 additions & 2 deletions stylus-sdk/src/storage/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ mod tests {
storage.set_len(4);
}

let mut want = value.clone();
let mut want = value;
want[31] = 4 * 2;
assert_eq!(test_vm.get_storage(U256::ZERO), want);
}
Expand Down Expand Up @@ -1000,7 +1000,7 @@ mod tests {
fn test_storage_bytes_base() {
let test_vm = TestVM::new();
let storage = StorageBytes::from(&test_vm);
let want: U256 = crypto::keccak(&[0; 32]).into();
let want: U256 = crypto::keccak([0; 32]).into();
assert_eq!(*storage.base(), want);
}

Expand Down
6 changes: 3 additions & 3 deletions stylus-sdk/src/storage/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ mod test {
vec.push(true);
vec.push(false);
vec.push(true);
assert_eq!(true, vec.get(0).unwrap());
assert_eq!(false, vec.get(1).unwrap());
assert_eq!(true, vec.get(2).unwrap());
assert!(vec.get(0).unwrap());
assert!(!vec.get(1).unwrap());
assert!(vec.get(2).unwrap());
}
}

0 comments on commit 930a78e

Please sign in to comment.