diff --git a/core-foundation/src/array.rs b/core-foundation/src/array.rs index 829e608..6864d40 100644 --- a/core-foundation/src/array.rs +++ b/core-foundation/src/array.rs @@ -50,7 +50,7 @@ impl<'a, T: FromVoid> Iterator for CFArrayIterator<'a, T> { } } -impl<'a, T: FromVoid> ExactSizeIterator for CFArrayIterator<'a, T> { +impl ExactSizeIterator for CFArrayIterator<'_, T> { fn len(&self) -> usize { (self.array.len() - self.index) as usize } diff --git a/core-foundation/src/base.rs b/core-foundation/src/base.rs index 92895d4..d5f9f47 100644 --- a/core-foundation/src/base.rs +++ b/core-foundation/src/base.rs @@ -253,7 +253,7 @@ impl TCFType for CFType { /// A reference to an element inside a container pub struct ItemRef<'a, T: 'a>(ManuallyDrop, PhantomData<&'a T>); -impl<'a, T> Deref for ItemRef<'a, T> { +impl Deref for ItemRef<'_, T> { type Target = T; fn deref(&self) -> &T { @@ -261,13 +261,13 @@ impl<'a, T> Deref for ItemRef<'a, T> { } } -impl<'a, T: fmt::Debug> fmt::Debug for ItemRef<'a, T> { +impl fmt::Debug for ItemRef<'_, T> { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { self.0.fmt(f) } } -impl<'a, T: PartialEq> PartialEq for ItemRef<'a, T> { +impl PartialEq for ItemRef<'_, T> { fn eq(&self, other: &Self) -> bool { self.0.eq(&other.0) } @@ -276,7 +276,7 @@ impl<'a, T: PartialEq> PartialEq for ItemRef<'a, T> { /// A reference to a mutable element inside a container pub struct ItemMutRef<'a, T: 'a>(ManuallyDrop, PhantomData<&'a T>); -impl<'a, T> Deref for ItemMutRef<'a, T> { +impl Deref for ItemMutRef<'_, T> { type Target = T; fn deref(&self) -> &T { @@ -284,19 +284,19 @@ impl<'a, T> Deref for ItemMutRef<'a, T> { } } -impl<'a, T> DerefMut for ItemMutRef<'a, T> { +impl DerefMut for ItemMutRef<'_, T> { fn deref_mut(&mut self) -> &mut T { &mut self.0 } } -impl<'a, T: fmt::Debug> fmt::Debug for ItemMutRef<'a, T> { +impl fmt::Debug for ItemMutRef<'_, T> { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { self.0.fmt(f) } } -impl<'a, T: PartialEq> PartialEq for ItemMutRef<'a, T> { +impl PartialEq for ItemMutRef<'_, T> { fn eq(&self, other: &Self) -> bool { self.0.eq(&other.0) } @@ -371,7 +371,7 @@ unsafe impl ToVoid<*const c_void> for *const c_void { } } -unsafe impl<'a> ToVoid for &'a CFType { +unsafe impl ToVoid for &CFType { fn to_void(&self) -> *const c_void { self.as_concrete_TypeRef().as_void_ptr() } diff --git a/core-foundation/src/string.rs b/core-foundation/src/string.rs index 3358bab..b58d371 100644 --- a/core-foundation/src/string.rs +++ b/core-foundation/src/string.rs @@ -151,7 +151,7 @@ impl CFString { } } -impl<'a> PartialEq<&'a str> for CFString { +impl PartialEq<&str> for CFString { fn eq(&self, other: &&str) -> bool { unsafe { let temp = CFStringCreateWithBytesNoCopy( @@ -167,7 +167,7 @@ impl<'a> PartialEq<&'a str> for CFString { } } -impl<'a> PartialEq for &'a str { +impl PartialEq for &str { #[inline] fn eq(&self, other: &CFString) -> bool { other.eq(self) diff --git a/core-graphics/src/event.rs b/core-graphics/src/event.rs index c6159e3..5f26173 100644 --- a/core-graphics/src/event.rs +++ b/core-graphics/src/event.rs @@ -47,8 +47,8 @@ bitflags! { /// /// These constants are the virtual keycodes defined originally in /// Inside Mac Volume V, pg. V-191. They identify physical keys on a -/// keyboard. The struct contains the values of the ANSIKeyCode, -/// KeyCode, ISOKeyCode and JISKeyCode of the original Carbon headers. +/// keyboard. The struct contains the values of the `ANSIKeyCode`, +/// `KeyCode`, `ISOKeyCode` and `JISKeyCode` of the original Carbon headers. /// /// Those constants with "ANSI" in the name are labeled /// according to the key position on an ANSI-standard US keyboard. diff --git a/core-graphics/src/path.rs b/core-graphics/src/path.rs index 51b574e..a5f525b 100644 --- a/core-graphics/src/path.rs +++ b/core-graphics/src/path.rs @@ -80,7 +80,7 @@ pub struct CGPathElementRef<'a> { phantom: PhantomData<&'a CGPathElement>, } -impl<'a> CGPathElementRef<'a> { +impl CGPathElementRef<'_> { fn new<'b>(element: *const CGPathElement) -> CGPathElementRef<'b> { CGPathElementRef { element, @@ -89,7 +89,7 @@ impl<'a> CGPathElementRef<'a> { } } -impl<'a> Deref for CGPathElementRef<'a> { +impl Deref for CGPathElementRef<'_> { type Target = CGPathElement; fn deref(&self) -> &CGPathElement { unsafe { &*self.element }