Skip to content

Commit

Permalink
!fixup clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dmkozh committed Dec 10, 2024
1 parent 1032f80 commit 1a84a27
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions soroban-env-common/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ pub trait EnvBase: Sized + Clone {
/// This trait is used by macro-generated dispatch and forwarding functions to
/// check arguments being passed to the Env. The default implementations call
/// through to the Env integrity-checking functions.
pub trait CheckedEnvArg: Sized {
fn check_env_arg<E: crate::Env>(self, _e: &E) -> Result<Self, E::Error> {
Ok(self)
Expand Down Expand Up @@ -327,7 +326,7 @@ generate_call_macro_with_all_host_functions!("env.json");
///////////////////////////////////////////////////////////////////////////////
/// X-macro use: defining trait Env
///////////////////////////////////////////////////////////////////////////////

//
// This is a helper macro used only by generate_env_trait below. It consumes
// a token-tree of the form:
//
Expand Down
2 changes: 1 addition & 1 deletion soroban-env-common/src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl<'a> From<ScValObjRef<'a>> for &'a ScVal {
}
}

impl<'a> AsRef<ScVal> for ScValObjRef<'a> {
impl AsRef<ScVal> for ScValObjRef<'_> {
fn as_ref(&self) -> &ScVal {
self.0
}
Expand Down
1 change: 1 addition & 0 deletions soroban-env-common/src/storage_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use num_derive::FromPrimitive;
/// an argument to storage functions. It doesn't correspond to any [`Val`] types,
/// and is passed by direct marshalling as a u64.
#[repr(u64)]
#[allow(non_local_definitions)]
#[derive(Debug, FromPrimitive, PartialEq, Eq, Clone, Copy)]
pub enum StorageType {
Temporary = 0,
Expand Down
5 changes: 2 additions & 3 deletions soroban-env-common/src/vmcaller_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use core::marker::PhantomData;
/// allows code to import and use `Env` directly (such as the native
/// contract) to call host methods without having to write `VmCaller::none()`
/// everywhere.
#[cfg(feature = "wasmi")]
pub struct VmCaller<'a, T>(pub Option<wasmi::Caller<'a, T>>);
#[cfg(feature = "wasmi")]
Expand Down Expand Up @@ -68,7 +67,7 @@ impl<'a, T> VmCaller<'a, T> {
///////////////////////////////////////////////////////////////////////////////
/// X-macro use: defining trait VmCallerEnv
///////////////////////////////////////////////////////////////////////////////

//
// This is a helper macro used only by generate_vmcaller_checked_env_trait
// below. It consumes a token-tree of the form:
//
Expand Down Expand Up @@ -160,7 +159,7 @@ call_macro_with_all_host_functions! { generate_vmcaller_checked_env_trait }
///////////////////////////////////////////////////////////////////////////////
/// X-macro use: impl<E> Env for VmCallerEnv<E>
///////////////////////////////////////////////////////////////////////////////

//
// This is a helper macro used only by
// generate_impl_checked_env_for_vmcaller_checked_env below. It consumes a
// token-tree of the form:
Expand Down

0 comments on commit 1a84a27

Please sign in to comment.