Skip to content

Commit

Permalink
piecrust: corrected clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
miloszm committed Apr 22, 2024
1 parent e52ec8a commit 063b7f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions piecrust/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ impl Session {
io: Arc::new(err),
})?;

let arg_len = instance.write_bytes_to_arg_buffer(&fdata);
let arg_len = instance.write_bytes_to_arg_buffer(&fdata)?;
instance.clear_arg_buffer_b();
let ret_len = instance
.call(fname, arg_len, limit)
Expand All @@ -779,7 +779,7 @@ impl Session {
.map_err(Error::normalize)?;
let ret = instance.read_bytes_from_arg_buffer(ret_len as u32);
let ret_b = instance.read_from_arg_buffer_b();
let allowance = *ret_b.get(0).unwrap_or(&0u64);
let allowance = *ret_b.first().unwrap_or(&0u64);
let charge = *ret_b.get(1).unwrap_or(&0u64);

let mut spent = limit - instance.get_remaining_gas();
Expand Down

0 comments on commit 063b7f7

Please sign in to comment.