Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix new clippy errors on Rust 1.83 #1919

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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