Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjiao committed Aug 1, 2024
1 parent 8ad3c81 commit a8a7831
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion vm/vm-runtime/src/verifier/transaction_arg_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub(crate) fn validate_combine_singer_and_args<S: MoveResolverExt>(
// Need to keep this here to ensure we return the historic correct error code for replay
for ty in func.parameters[signer_param_cnt..].iter() {
let valid = is_valid_txn_arg(
&session,
session,
&ty.subst(&func.type_arguments).unwrap(),
allowed_structs,
);
Expand Down
6 changes: 3 additions & 3 deletions vm/vm-runtime/src/vm_adapter/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ impl<'r, 'l, R: MoveResolver> SessionAdapter<'r, 'l, R> {
let old_module_ref = self.inner.load_module(&module_id)?;
let old_module = old_module_ref.module();
let old_m = normalized::Module::new(old_module);
let new_m = normalized::Module::new(&module);
let new_m = normalized::Module::new(module);
if Compatibility::new(true, true, false)
.check(&old_m, &new_m)
.is_err()
Expand Down Expand Up @@ -306,7 +306,7 @@ impl<'r, 'l, R: MoveResolver> SessionAdapter<'r, 'l, R> {

//ensure the script function not return value
pub(crate) fn check_script_return(return_: Vec<Type>) -> VMResult<()> {
return if !return_.is_empty() {
if !return_.is_empty() {
Err(PartialVMError::new(StatusCode::RET_TYPE_MISMATCH_ERROR)
.with_message(format!(
"Expected script function should not return value, but got {:?}",
Expand All @@ -315,7 +315,7 @@ impl<'r, 'l, R: MoveResolver> SessionAdapter<'r, 'l, R> {
.finish(Location::Undefined))
} else {
Ok(())
};
}
}

fn check_script_signer_and_build_args(
Expand Down

0 comments on commit a8a7831

Please sign in to comment.