diff --git a/Cargo.toml b/Cargo.toml index 5ba33b9..aeed7e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] members = ["amqprs", "amqp_serde", "examples", "benchmarks"] - +rust-version = "1.56" resolver = "2" # [profile.bench] diff --git a/amqp_serde/src/ser.rs b/amqp_serde/src/ser.rs index a396672..5c66e06 100644 --- a/amqp_serde/src/ser.rs +++ b/amqp_serde/src/ser.rs @@ -135,9 +135,9 @@ where self.serialize_unit() } - fn serialize_some(self, value: &T) -> Result + fn serialize_some(self, value: &T) -> Result where - T: serde::Serialize, + T: serde::Serialize + ?Sized, { value.serialize(self) } @@ -161,15 +161,15 @@ where } // serialize only contained value - fn serialize_newtype_struct(self, _name: &'static str, value: &T) -> Result + fn serialize_newtype_struct(self, _name: &'static str, value: &T) -> Result where - T: serde::Serialize, + T: serde::Serialize + ?Sized, { value.serialize(self) } // serialize variant name and contained value - fn serialize_newtype_variant( + fn serialize_newtype_variant( self, _name: &'static str, _variant_index: u32, @@ -177,7 +177,7 @@ where value: &T, ) -> Result where - T: serde::Serialize, + T: serde::Serialize + ?Sized, { variant.serialize(&mut *self)?; value.serialize(&mut *self) @@ -252,9 +252,9 @@ where type Error = Error; - fn serialize_element(&mut self, value: &T) -> Result<()> + fn serialize_element(&mut self, value: &T) -> Result<()> where - T: Serialize, + T: Serialize + ?Sized, { value.serialize(&mut **self) } diff --git a/amqprs/src/api/connection.rs b/amqprs/src/api/connection.rs index d034001..2730617 100644 --- a/amqprs/src/api/connection.rs +++ b/amqprs/src/api/connection.rs @@ -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`.