Skip to content

Commit

Permalink
fix: address some clippy nits and warnings (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien authored Aug 6, 2024
1 parent c2e3fcd commit 42deb4b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
8 changes: 1 addition & 7 deletions frc53_nft/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -587,13 +587,7 @@ mod test {
{
// mint no tokens
let mut hook = nft
.mint(
&ALICE,
&ALICE,
vec![String::new(); 0],
RawBytes::default(),
RawBytes::default(),
)
.mint(&ALICE, &ALICE, Vec::default(), RawBytes::default(), RawBytes::default())
.unwrap();
let res = hook.call(&nft.runtime).unwrap();
assert_eq!(res.token_ids, Vec::<TokenID>::default());
Expand Down
3 changes: 2 additions & 1 deletion testing/integration/tests/common/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(dead_code)]
use std::env;

use cid::Cid;
Expand Down Expand Up @@ -80,7 +81,7 @@ impl<B: Blockstore, E: Externs> TestHelpers for Tester<B, E> {
gas_limit: BLOCK_GAS_LIMIT,
method_num,
sequence: unsafe { SEQUENCE },
params: if let Some(params) = params { params } else { RawBytes::default() },
params: params.unwrap_or_default(),
..Message::default()
};
unsafe {
Expand Down
4 changes: 2 additions & 2 deletions testing/integration/tests/frc46_tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ fn it_mints_tokens() {

// Helper to simplify sending messages
let mut sequence = 0u64;
let mut call_method = |from, to, method_num, params| {
let mut call_method = |from, to, method_num, params: Option<RawBytes>| {
let message = Message {
from,
to,
gas_limit: 99999999,
method_num,
sequence,
params: if let Some(params) = params { params } else { RawBytes::default() },
params: params.unwrap_or_default(),
..Message::default()
};
sequence += 1;
Expand Down

0 comments on commit 42deb4b

Please sign in to comment.