Skip to content

Commit

Permalink
fix new clippy errors on Rust 1.83 (bytecodealliance#1919)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts authored Nov 28, 2024
1 parent 77122f1 commit 7fe32e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/wasm-wave/src/value/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl From<String> for Value {
}
}

impl<'a> ValueTyped for &'a str {
impl ValueTyped for &str {
fn value_type() -> Type {
String::value_type()
}
Expand Down
8 changes: 4 additions & 4 deletions crates/wasm-wave/src/wasm/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{
/// Implements a WAVE-formatted [`Display`] for a [`WasmType`].
pub struct DisplayType<'a, T: WasmType>(pub &'a T);

impl<'a, T: WasmType> Display for DisplayType<'a, T> {
impl<T: WasmType> Display for DisplayType<'_, T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let ty = self.0;
match ty.kind() {
Expand Down Expand Up @@ -95,7 +95,7 @@ impl<'a, T: WasmType> Display for DisplayType<'a, T> {
/// Implements a WAVE-formatted [`Display`] for a [`WasmValue`].
pub struct DisplayValue<'a, T: WasmValue>(pub &'a T);

impl<'a, T: WasmValue> Display for DisplayValue<'a, T> {
impl<T: WasmValue> Display for DisplayValue<'_, T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut buf = vec![];
Writer::new(&mut buf)
Expand Down Expand Up @@ -155,7 +155,7 @@ impl<T: WasmFunc> Display for DisplayFunc<T> {
/// Implements a WAVE-formatted [`Display`] for [`WasmValue`] func arguments.
pub struct DisplayFuncArgs<'a, T: WasmValue>(pub &'a [T]);

impl<'a, T: WasmValue> Display for DisplayFuncArgs<'a, T> {
impl<T: WasmValue> Display for DisplayFuncArgs<'_, T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("(")?;
for (idx, v) in self.0.iter().enumerate() {
Expand All @@ -171,7 +171,7 @@ impl<'a, T: WasmValue> Display for DisplayFuncArgs<'a, T> {
/// Implements a WAVE-formatted [`Display`] for [`WasmValue`] func results.
pub struct DisplayFuncResults<'a, T: WasmValue>(pub &'a [T]);

impl<'a, T: WasmValue> Display for DisplayFuncResults<'a, T> {
impl<T: WasmValue> Display for DisplayFuncResults<'_, T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
if self.0.len() == 1 {
DisplayValue(&self.0[0]).fmt(f)
Expand Down

0 comments on commit 7fe32e3

Please sign in to comment.