diff --git a/palette/src/convert/from_into_color_mut.rs b/palette/src/convert/from_into_color_mut.rs index 489528337..51224a90c 100644 --- a/palette/src/convert/from_into_color_mut.rs +++ b/palette/src/convert/from_into_color_mut.rs @@ -316,7 +316,7 @@ where } } -impl<'a, T, U> Deref for FromColorMutGuard<'a, T, U> +impl Deref for FromColorMutGuard<'_, T, U> where T: FromColorMut + ?Sized, U: FromColorMut + ?Sized, @@ -333,7 +333,7 @@ where } } -impl<'a, T, U> DerefMut for FromColorMutGuard<'a, T, U> +impl DerefMut for FromColorMutGuard<'_, T, U> where T: FromColorMut + ?Sized, U: FromColorMut + ?Sized, @@ -348,7 +348,7 @@ where } } -impl<'a, T, U> Drop for FromColorMutGuard<'a, T, U> +impl Drop for FromColorMutGuard<'_, T, U> where T: FromColorMut + ?Sized, U: FromColorMut + ?Sized, diff --git a/palette/src/convert/from_into_color_unclamped_mut.rs b/palette/src/convert/from_into_color_unclamped_mut.rs index 4c58a4eba..1a91f61cb 100644 --- a/palette/src/convert/from_into_color_unclamped_mut.rs +++ b/palette/src/convert/from_into_color_unclamped_mut.rs @@ -317,7 +317,7 @@ where } } -impl<'a, T, U> Deref for FromColorUnclampedMutGuard<'a, T, U> +impl Deref for FromColorUnclampedMutGuard<'_, T, U> where T: FromColorUnclampedMut + ?Sized, U: FromColorUnclampedMut + ?Sized, @@ -334,7 +334,7 @@ where } } -impl<'a, T, U> DerefMut for FromColorUnclampedMutGuard<'a, T, U> +impl DerefMut for FromColorUnclampedMutGuard<'_, T, U> where T: FromColorUnclampedMut + ?Sized, U: FromColorUnclampedMut + ?Sized, @@ -349,7 +349,7 @@ where } } -impl<'a, T, U> Drop for FromColorUnclampedMutGuard<'a, T, U> +impl Drop for FromColorUnclampedMutGuard<'_, T, U> where T: FromColorUnclampedMut + ?Sized, U: FromColorUnclampedMut + ?Sized, diff --git a/palette/src/hues.rs b/palette/src/hues.rs index c3f0e641d..23d3e3179 100644 --- a/palette/src/hues.rs +++ b/palette/src/hues.rs @@ -225,7 +225,7 @@ macro_rules! make_hues { /// Get a hue, or slice of hues, with references to the values at `index`. See [`slice::get`] for details. #[inline(always)] - pub fn get<'a, I, T>(&'a self, index: I) -> Option<$name<&>::Output>> + pub fn get<'a, I, T>(&'a self, index: I) -> Option<$name<&'a >::Output>> where T: 'a, C: AsRef<[T]>, @@ -236,7 +236,7 @@ macro_rules! make_hues { /// Get a hue, or slice of hues, that allows modifying the values at `index`. See [`slice::get_mut`] for details. #[inline(always)] - pub fn get_mut<'a, I, T>(&'a mut self, index: I) -> Option<$name<&mut >::Output>> + pub fn get_mut<'a, I, T>(&'a mut self, index: I) -> Option<$name<&'a mut >::Output>> where T: 'a, C: AsMut<[T]>, diff --git a/palette/src/macros/struct_of_arrays.rs b/palette/src/macros/struct_of_arrays.rs index 937b5656e..923e5b52e 100644 --- a/palette/src/macros/struct_of_arrays.rs +++ b/palette/src/macros/struct_of_arrays.rs @@ -1044,7 +1044,7 @@ macro_rules! impl_struct_of_arrays_methods { /// Get a color, or slice of colors, with references to the components at `index`. See [`slice::get`] for details. #[inline(always)] - pub fn get<'a, I, T>(&'a self, index: I) -> Option<$self_ty<$($phantom_ty,)? &>::Output>> + pub fn get<'a, I, T>(&'a self, index: I) -> Option<$self_ty<$($phantom_ty,)? &'a >::Output>> where T: 'a, C: AsRef<[T]>, @@ -1064,7 +1064,7 @@ macro_rules! impl_struct_of_arrays_methods { /// Get a color, or slice of colors, that allows modifying the components at `index`. See [`slice::get_mut`] for details. #[inline(always)] - pub fn get_mut<'a, I, T>(&'a mut self, index: I) -> Option<$self_ty<$($phantom_ty,)? &mut >::Output>> + pub fn get_mut<'a, I, T>(&'a mut self, index: I) -> Option<$self_ty<$($phantom_ty,)? &'a mut >::Output>> where T: 'a, C: AsMut<[T]>, @@ -1136,8 +1136,8 @@ macro_rules! impl_struct_of_arrays_methods { /// Get a color, or slice of colors, with references to the components at `index`. See [`slice::get`] for details. #[inline(always)] pub fn get<'a, I, T, A>(&'a self, index: I) -> Option>::Output>, - &>::Output + $self_ty<$($phantom_ty,)? &'a >::Output>, + &'a >::Output >> where T: 'a, @@ -1159,8 +1159,8 @@ macro_rules! impl_struct_of_arrays_methods { /// Get a color, or slice of colors, that allows modifying the components at `index`. See [`slice::get_mut`] for details. #[inline(always)] pub fn get_mut<'a, I, T, A>(&'a mut self, index: I) -> Option>::Output>, - &mut >::Output + $self_ty<$($phantom_ty,)? &'a mut >::Output>, + &'a mut >::Output >> where T: 'a, @@ -1252,7 +1252,7 @@ macro_rules! impl_struct_of_arrays_methods_hue { /// Get a color, or slice of colors, with references to the components at `index`. See [`slice::get`] for details. #[inline(always)] - pub fn get<'a, I, T>(&'a self, index: I) -> Option<$self_ty<$($phantom_ty,)? &>::Output>> + pub fn get<'a, I, T>(&'a self, index: I) -> Option<$self_ty<$($phantom_ty,)? &'a >::Output>> where T: 'a, C: AsRef<[T]>, @@ -1270,7 +1270,7 @@ macro_rules! impl_struct_of_arrays_methods_hue { /// Get a color, or slice of colors, that allows modifying the components at `index`. See [`slice::get_mut`] for details. #[inline(always)] - pub fn get_mut<'a, I, T>(&'a mut self, index: I) -> Option<$self_ty<$($phantom_ty,)? &mut >::Output>> + pub fn get_mut<'a, I, T>(&'a mut self, index: I) -> Option<$self_ty<$($phantom_ty,)? &'a mut >::Output>> where T: 'a, C: AsMut<[T]>, @@ -1343,8 +1343,8 @@ macro_rules! impl_struct_of_arrays_methods_hue { /// Get a color, or slice of colors, with references to the components at `index`. See [`slice::get`] for details. #[inline(always)] pub fn get<'a, I, T, A>(&'a self, index: I) -> Option>::Output>, - &>::Output + $self_ty<$($phantom_ty,)? &'a >::Output>, + &'a >::Output >> where T: 'a, @@ -1366,8 +1366,8 @@ macro_rules! impl_struct_of_arrays_methods_hue { /// Get a color, or slice of colors, that allows modifying the components at `index`. See [`slice::get_mut`] for details. #[inline(always)] pub fn get_mut<'a, I, T, A>(&'a mut self, index: I) -> Option>::Output>, - &mut >::Output + $self_ty<$($phantom_ty,)? &'a mut >::Output>, + &'a mut >::Output >> where T: 'a, diff --git a/palette/src/serde/alpha_deserializer.rs b/palette/src/serde/alpha_deserializer.rs index 92157f7fa..40f260bae 100644 --- a/palette/src/serde/alpha_deserializer.rs +++ b/palette/src/serde/alpha_deserializer.rs @@ -12,7 +12,7 @@ pub(crate) struct AlphaDeserializer<'a, D, A> { pub alpha: &'a mut Option, } -impl<'de, 'a, D, A> Deserializer<'de> for AlphaDeserializer<'a, D, A> +impl<'de, D, A> Deserializer<'de> for AlphaDeserializer<'_, D, A> where D: Deserializer<'de>, A: Deserialize<'de>, @@ -305,7 +305,7 @@ struct AlphaSeqVisitor<'a, D, A> { alpha: &'a mut Option, } -impl<'de, 'a, D, A> Visitor<'de> for AlphaSeqVisitor<'a, D, A> +impl<'de, D, A> Visitor<'de> for AlphaSeqVisitor<'_, D, A> where D: Visitor<'de>, A: Deserialize<'de>, @@ -336,7 +336,7 @@ struct AlphaMapVisitor<'a, D, A> { field_count: Option, } -impl<'de, 'a, D, A> Visitor<'de> for AlphaMapVisitor<'a, D, A> +impl<'de, D, A> Visitor<'de> for AlphaMapVisitor<'_, D, A> where D: Visitor<'de>, A: Deserialize<'de>, @@ -390,7 +390,7 @@ struct MapWrapper<'a, T, A> { field_count: Option, } -impl<'a, 'de, T, A> MapAccess<'de> for MapWrapper<'a, T, A> +impl<'de, T, A> MapAccess<'de> for MapWrapper<'_, T, A> where T: MapAccess<'de>, A: Deserialize<'de>, @@ -554,7 +554,7 @@ struct StructFieldDeserializer<'a, E> { error: PhantomData E>, } -impl<'a, 'de, E> Deserializer<'de> for StructFieldDeserializer<'a, E> +impl<'de, E> Deserializer<'de> for StructFieldDeserializer<'_, E> where E: serde::de::Error, { diff --git a/palette/src/serde/alpha_serializer.rs b/palette/src/serde/alpha_serializer.rs index b1edd4a1e..a05e07a91 100644 --- a/palette/src/serde/alpha_serializer.rs +++ b/palette/src/serde/alpha_serializer.rs @@ -230,7 +230,7 @@ fn alpha_serializer_error() -> ! { unimplemented!("AlphaSerializer can only serialize structs, maps and sequences") } -impl<'a, S, A> SerializeSeq for AlphaSerializer<'a, S, A> +impl SerializeSeq for AlphaSerializer<'_, S, A> where S: SerializeSeq, A: Serialize, @@ -252,7 +252,7 @@ where } } -impl<'a, S, A> SerializeTuple for AlphaSerializer<'a, S, A> +impl SerializeTuple for AlphaSerializer<'_, S, A> where S: SerializeTuple, A: Serialize, @@ -274,7 +274,7 @@ where } } -impl<'a, S, A> SerializeTupleStruct for AlphaSerializer<'a, S, A> +impl SerializeTupleStruct for AlphaSerializer<'_, S, A> where S: SerializeTupleStruct, A: Serialize, @@ -296,7 +296,7 @@ where } } -impl<'a, S, A> SerializeTupleVariant for AlphaSerializer<'a, S, A> +impl SerializeTupleVariant for AlphaSerializer<'_, S, A> where S: SerializeTupleVariant, A: Serialize, @@ -318,7 +318,7 @@ where } } -impl<'a, S, A> SerializeMap for AlphaSerializer<'a, S, A> +impl SerializeMap for AlphaSerializer<'_, S, A> where S: SerializeMap, A: Serialize, @@ -355,7 +355,7 @@ where } } -impl<'a, S, A> SerializeStruct for AlphaSerializer<'a, S, A> +impl SerializeStruct for AlphaSerializer<'_, S, A> where S: SerializeStruct, A: Serialize, @@ -381,7 +381,7 @@ where } } -impl<'a, S, A> SerializeStructVariant for AlphaSerializer<'a, S, A> +impl SerializeStructVariant for AlphaSerializer<'_, S, A> where S: SerializeStructVariant, A: Serialize,