diff --git a/packages/core/src/middleware/arrow.rs b/packages/core/src/middleware/arrow.rs index a64e56f..7d780ce 100644 --- a/packages/core/src/middleware/arrow.rs +++ b/packages/core/src/middleware/arrow.rs @@ -87,7 +87,7 @@ impl<'a, Element: Clone + 'static, Window: Clone> Arrow<'a, Element, Window> { } } -impl<'a, Element: Clone + 'static, Window: Clone> Clone for Arrow<'a, Element, Window> { +impl Clone for Arrow<'_, Element, Window> { fn clone(&self) -> Self { Self { options: self.options.clone(), @@ -216,8 +216,8 @@ impl Middleware - MiddlewareWithOptions> for Arrow<'a, Element, Window> +impl MiddlewareWithOptions> + for Arrow<'_, Element, Window> { fn options(&self) -> &Derivable> { &self.options diff --git a/packages/core/src/middleware/auto_placement.rs b/packages/core/src/middleware/auto_placement.rs index 9aa43cc..4066d7a 100644 --- a/packages/core/src/middleware/auto_placement.rs +++ b/packages/core/src/middleware/auto_placement.rs @@ -161,7 +161,7 @@ pub struct AutoPlacement<'a, Element: Clone + 'static, Window: Clone> { options: Derivable<'a, Element, Window, AutoPlacementOptions>, } -impl<'a, Element: Clone + 'static, Window: Clone> Clone for AutoPlacement<'a, Element, Window> { +impl Clone for AutoPlacement<'_, Element, Window> { fn clone(&self) -> Self { Self { options: self.options.clone(), @@ -365,9 +365,9 @@ impl Middleware +impl MiddlewareWithOptions> - for AutoPlacement<'a, Element, Window> + for AutoPlacement<'_, Element, Window> { fn options(&self) -> &Derivable> { &self.options diff --git a/packages/core/src/middleware/flip.rs b/packages/core/src/middleware/flip.rs index 89e8ae0..7559d28 100644 --- a/packages/core/src/middleware/flip.rs +++ b/packages/core/src/middleware/flip.rs @@ -169,7 +169,7 @@ impl<'a, Element: Clone + 'static, Window: Clone> Flip<'a, Element, Window> { } } -impl<'a, Element: Clone + 'static, Window: Clone> Clone for Flip<'a, Element, Window> { +impl Clone for Flip<'_, Element, Window> { fn clone(&self) -> Self { Self { options: self.options.clone(), @@ -367,8 +367,8 @@ impl Middleware MiddlewareWithOptions> - for Flip<'a, Element, Window> +impl MiddlewareWithOptions> + for Flip<'_, Element, Window> { fn options(&self) -> &Derivable> { &self.options diff --git a/packages/core/src/middleware/hide.rs b/packages/core/src/middleware/hide.rs index 0314046..b88c9c6 100644 --- a/packages/core/src/middleware/hide.rs +++ b/packages/core/src/middleware/hide.rs @@ -113,7 +113,7 @@ impl<'a, Element: Clone, Window: Clone> Hide<'a, Element, Window> { } } -impl<'a, Element: Clone + 'static, Window: Clone> Clone for Hide<'a, Element, Window> { +impl Clone for Hide<'_, Element, Window> { fn clone(&self) -> Self { Self { options: self.options.clone(), @@ -200,8 +200,8 @@ impl Middleware MiddlewareWithOptions> - for Hide<'a, Element, Window> +impl MiddlewareWithOptions> + for Hide<'_, Element, Window> { fn options(&self) -> &Derivable> { &self.options diff --git a/packages/core/src/middleware/inline.rs b/packages/core/src/middleware/inline.rs index 74d9d17..b2436ed 100644 --- a/packages/core/src/middleware/inline.rs +++ b/packages/core/src/middleware/inline.rs @@ -145,7 +145,7 @@ impl<'a, Element: Clone + 'static, Window: Clone> Inline<'a, Element, Window> { } } -impl<'a, Element: Clone, Window: Clone> Clone for Inline<'a, Element, Window> { +impl Clone for Inline<'_, Element, Window> { fn clone(&self) -> Self { Self { options: self.options.clone(), @@ -309,8 +309,8 @@ impl } } -impl<'a, Element: Clone, Window: Clone> MiddlewareWithOptions - for Inline<'a, Element, Window> +impl MiddlewareWithOptions + for Inline<'_, Element, Window> { fn options(&self) -> &Derivable { &self.options diff --git a/packages/core/src/middleware/offset.rs b/packages/core/src/middleware/offset.rs index de7ffa1..91a7150 100644 --- a/packages/core/src/middleware/offset.rs +++ b/packages/core/src/middleware/offset.rs @@ -163,7 +163,7 @@ impl<'a, Element: Clone, Window: Clone> Offset<'a, Element, Window> { } } -impl<'a, Element: Clone + 'static, Window: Clone> Clone for Offset<'a, Element, Window> { +impl Clone for Offset<'_, Element, Window> { fn clone(&self) -> Self { Self { options: self.options.clone(), @@ -223,8 +223,8 @@ impl Middleware MiddlewareWithOptions - for Offset<'a, Element, Window> +impl MiddlewareWithOptions + for Offset<'_, Element, Window> { fn options(&self) -> &Derivable { &self.options diff --git a/packages/core/src/middleware/shift.rs b/packages/core/src/middleware/shift.rs index 9cf201e..5fa3b38 100644 --- a/packages/core/src/middleware/shift.rs +++ b/packages/core/src/middleware/shift.rs @@ -147,7 +147,7 @@ impl<'a, Element: Clone, Window: Clone> Shift<'a, Element, Window> { } } -impl<'a, Element: Clone, Window: Clone> Clone for Shift<'a, Element, Window> { +impl Clone for Shift<'_, Element, Window> { fn clone(&self) -> Self { Self { options: self.options.clone(), @@ -248,9 +248,9 @@ impl } } -impl<'a, Element: Clone, Window: Clone> +impl MiddlewareWithOptions> - for Shift<'a, Element, Window> + for Shift<'_, Element, Window> { fn options(&self) -> &Derivable> { &self.options @@ -355,9 +355,7 @@ impl<'a, Element: Clone, Window: Clone> LimitShiftOptions<'a, Element, Window> { } } -impl<'a, Element: Clone + 'static, Window: Clone> Default - for LimitShiftOptions<'a, Element, Window> -{ +impl Default for LimitShiftOptions<'_, Element, Window> { fn default() -> Self { Self { offset: Default::default(), diff --git a/packages/core/src/middleware/size.rs b/packages/core/src/middleware/size.rs index dd6ce3e..ecd38a2 100644 --- a/packages/core/src/middleware/size.rs +++ b/packages/core/src/middleware/size.rs @@ -57,7 +57,7 @@ impl<'a, Element: Clone, Window: Clone> SizeOptions<'a, Element, Window> { } } -impl<'a, Element: Clone, Window: Clone> Default for SizeOptions<'a, Element, Window> { +impl Default for SizeOptions<'_, Element, Window> { fn default() -> Self { Self { detect_overflow: Default::default(), @@ -66,8 +66,8 @@ impl<'a, Element: Clone, Window: Clone> Default for SizeOptions<'a, Element, Win } } -impl<'a, Element: Clone + PartialEq, Window: Clone + PartialEq> PartialEq - for SizeOptions<'a, Element, Window> +impl PartialEq + for SizeOptions<'_, Element, Window> { fn eq(&self, other: &Self) -> bool { self.detect_overflow == other.detect_overflow @@ -115,7 +115,7 @@ impl<'a, Element: Clone + 'static, Window: Clone> Size<'a, Element, Window> { } } -impl<'a, Element: Clone, Window: Clone> Clone for Size<'a, Element, Window> { +impl Clone for Size<'_, Element, Window> { fn clone(&self) -> Self { Self { options: self.options.clone(), diff --git a/packages/core/src/types.rs b/packages/core/src/types.rs index 766af58..0ee0b95 100644 --- a/packages/core/src/types.rs +++ b/packages/core/src/types.rs @@ -16,7 +16,7 @@ pub enum Derivable<'a, Element: Clone + 'static, Window: Clone, T: Clone> { Fn(DerivableFn<'a, Element, Window, T>), } -impl<'a, Element: Clone, Window: Clone, T: Clone> Clone for Derivable<'a, Element, Window, T> { +impl Clone for Derivable<'_, Element, Window, T> { fn clone(&self) -> Self { match self { Self::Value(value) => Self::Value(value.clone()), @@ -25,7 +25,7 @@ impl<'a, Element: Clone, Window: Clone, T: Clone> Clone for Derivable<'a, Elemen } } -impl<'a, Element: Clone, Window: Clone, T: Clone> Derivable<'a, Element, Window, T> { +impl Derivable<'_, Element, Window, T> { pub fn evaluate(&self, state: MiddlewareState) -> T { match self { Derivable::Value(value) => value.clone(), @@ -34,7 +34,7 @@ impl<'a, Element: Clone, Window: Clone, T: Clone> Derivable<'a, Element, Window, } } -impl<'a, Element: Clone, Window: Clone, T: Clone> From for Derivable<'a, Element, Window, T> { +impl From for Derivable<'_, Element, Window, T> { fn from(value: T) -> Self { Derivable::Value(value) } @@ -48,8 +48,8 @@ impl<'a, Element: Clone, Window: Clone, T: Clone> From PartialEq - for Derivable<'a, Element, Window, T> +impl PartialEq + for Derivable<'_, Element, Window, T> { fn eq(&self, other: &Self) -> bool { match (self, other) { @@ -297,7 +297,7 @@ impl<'a, Element: Clone> Elements<'a, Element> { } } -impl<'a, Element: Clone> Clone for Elements<'a, Element> { +impl Clone for Elements<'_, Element> { fn clone(&self) -> Self { Self { reference: self.reference.clone(), @@ -319,7 +319,7 @@ pub struct MiddlewareState<'a, Element: Clone + 'static, Window: Clone> { pub platform: &'a dyn Platform, } -impl<'a, Element: Clone, Window: Clone> Clone for MiddlewareState<'a, Element, Window> { +impl Clone for MiddlewareState<'_, Element, Window> { fn clone(&self) -> Self { Self { x: self.x, diff --git a/packages/utils/src/dom.rs b/packages/utils/src/dom.rs index 6c6cb59..d570f8b 100644 --- a/packages/utils/src/dom.rs +++ b/packages/utils/src/dom.rs @@ -182,7 +182,7 @@ impl<'a> From<&'a HtmlElement> for ElementOrCss<'a> { } } -impl<'a> From for ElementOrCss<'a> { +impl From for ElementOrCss<'_> { fn from(value: CssStyleDeclaration) -> Self { ElementOrCss::Css(value) } diff --git a/packages/utils/src/lib.rs b/packages/utils/src/lib.rs index 11eb62e..2eb83cb 100644 --- a/packages/utils/src/lib.rs +++ b/packages/utils/src/lib.rs @@ -479,7 +479,7 @@ pub enum ElementOrVirtual<'a, Element: Clone + 'static> { VirtualElement(Box>), } -impl<'a, Element: Clone + 'static> ElementOrVirtual<'a, Element> { +impl ElementOrVirtual<'_, Element> { pub fn resolve(self) -> Option { match self { ElementOrVirtual::Element(element) => Some(element.clone()), @@ -494,7 +494,7 @@ impl<'a, Element: Clone> From<&'a Element> for ElementOrVirtual<'a, Element> { } } -impl<'a, Element: Clone> From>> for ElementOrVirtual<'a, Element> { +impl From>> for ElementOrVirtual<'_, Element> { fn from(value: Box>) -> Self { ElementOrVirtual::VirtualElement(value) }