Skip to content

Commit

Permalink
Update rust to 1.83.0 (#975)
Browse files Browse the repository at this point in the history
* rust 1.83.0

* clippy
  • Loading branch information
edg-l authored Dec 18, 2024
1 parent 4bd59e9 commit 7ec1e3c
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.82.0"
channel = "1.83.0"
components = ["rustfmt", "clippy"]
profile = "minimal"
2 changes: 1 addition & 1 deletion src/arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl<'a> ValueWithInfoWrapper<'a> {
}
}

impl<'a> AbiArgument for ValueWithInfoWrapper<'a> {
impl AbiArgument for ValueWithInfoWrapper<'_> {
fn to_bytes(&self, buffer: &mut Vec<u8>) -> Result<()> {
match (self.value, self.info) {
(value, CoreTypeConcrete::Box(info)) => {
Expand Down
2 changes: 1 addition & 1 deletion src/cache/aot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ where
}
}

impl<'a, K> Debug for AotProgramCache<'a, K>
impl<K> Debug for AotProgramCache<'_, K>
where
K: PartialEq + Eq + Hash,
{
Expand Down
2 changes: 1 addition & 1 deletion src/cache/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ where
}
}

impl<'a, K> Debug for JitProgramCache<'a, K>
impl<K> Debug for JitProgramCache<'_, K>
where
K: Eq + Hash + PartialEq,
{
Expand Down
4 changes: 2 additions & 2 deletions src/executor/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ pub struct JitNativeExecutor<'m> {
gas_metadata: GasMetadata,
}

unsafe impl<'a> Send for JitNativeExecutor<'a> {}
unsafe impl<'a> Sync for JitNativeExecutor<'a> {}
unsafe impl Send for JitNativeExecutor<'_> {}
unsafe impl Sync for JitNativeExecutor<'_> {}

impl std::fmt::Debug for JitNativeExecutor<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion src/libfuncs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ where
}
}

impl<'ctx, 'this> Deref for LibfuncHelper<'ctx, 'this> {
impl<'ctx> Deref for LibfuncHelper<'ctx, '_> {
type Target = Module<'ctx>;

fn deref(&self) -> &Self::Target {
Expand Down
2 changes: 1 addition & 1 deletion src/libfuncs/function_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pub fn build<'ctx, 'this>(
arguments.insert(0, stack_ptr);

Some(true)
} else if return_types.first().is_some() {
} else if !return_types.is_empty() {
let (type_id, type_info) = return_types[0];
result_types.push(type_info.build(context, helper, registry, metadata, type_id)?);

Expand Down
4 changes: 2 additions & 2 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -965,13 +965,13 @@ impl<'a, T> WithSelf<'a, T> {
}
}

impl<'a, T> AsRef<T> for WithSelf<'a, T> {
impl<T> AsRef<T> for WithSelf<'_, T> {
fn as_ref(&self) -> &T {
self.inner
}
}

impl<'a, T> Deref for WithSelf<'a, T> {
impl<T> Deref for WithSelf<'_, T> {
type Target = T;

fn deref(&self) -> &T {
Expand Down

0 comments on commit 7ec1e3c

Please sign in to comment.