Skip to content

Commit

Permalink
update clippy for 1.78
Browse files Browse the repository at this point in the history
  • Loading branch information
gftea committed May 16, 2024
1 parent e2e62a9 commit 73777be
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]

members = ["amqprs", "amqp_serde", "examples", "benchmarks"]

rust-version = "1.56"
resolver = "2"

# [profile.bench]
Expand Down
16 changes: 8 additions & 8 deletions amqp_serde/src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ where
self.serialize_unit()
}

fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Self::Ok>
fn serialize_some<T>(self, value: &T) -> Result<Self::Ok>
where
T: serde::Serialize,
T: serde::Serialize + ?Sized,
{
value.serialize(self)
}
Expand All @@ -161,23 +161,23 @@ where
}

// serialize only contained value
fn serialize_newtype_struct<T: ?Sized>(self, _name: &'static str, value: &T) -> Result<Self::Ok>
fn serialize_newtype_struct<T>(self, _name: &'static str, value: &T) -> Result<Self::Ok>
where
T: serde::Serialize,
T: serde::Serialize + ?Sized,
{
value.serialize(self)
}

// serialize variant name and contained value
fn serialize_newtype_variant<T: ?Sized>(
fn serialize_newtype_variant<T>(
self,
_name: &'static str,
_variant_index: u32,
variant: &'static str,
value: &T,
) -> Result<Self::Ok>
where
T: serde::Serialize,
T: serde::Serialize + ?Sized,
{
variant.serialize(&mut *self)?;
value.serialize(&mut *self)
Expand Down Expand Up @@ -252,9 +252,9 @@ where

type Error = Error;

fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<()>
fn serialize_element<T>(&mut self, value: &T) -> Result<()>
where
T: Serialize,
T: Serialize + ?Sized,
{
value.serialize(&mut **self)
}
Expand Down
1 change: 1 addition & 0 deletions amqprs/src/api/connection.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::assigning_clones)] // Need to support `1.56.0` but `clone_into` is stable since `1.63.0`
//! Implementation of AMQP_0-9-1's Connection class compatible with RabbitMQ.
//!
//! It provides [APIs][`Connection`] to manage an AMQP `Connection`.
Expand Down

0 comments on commit 73777be

Please sign in to comment.