Skip to content

Commit

Permalink
Remove unneeded lifetimes in array/mod.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Nov 5, 2020
1 parent 4d247ad commit 5058cad
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions library/core/src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,22 +254,22 @@ where
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'b, A, B, const N: usize> PartialEq<&'b [B]> for [A; N]
impl<A, B, const N: usize> PartialEq<&[B]> for [A; N]
where
A: PartialEq<B>,
{
#[inline]
fn eq(&self, other: &&'b [B]) -> bool {
fn eq(&self, other: &&[B]) -> bool {
self[..] == other[..]
}
#[inline]
fn ne(&self, other: &&'b [B]) -> bool {
fn ne(&self, other: &&[B]) -> bool {
self[..] != other[..]
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'b, A, B, const N: usize> PartialEq<[A; N]> for &'b [B]
impl<A, B, const N: usize> PartialEq<[A; N]> for &[B]
where
B: PartialEq<A>,
{
Expand All @@ -284,22 +284,22 @@ where
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'b, A, B, const N: usize> PartialEq<&'b mut [B]> for [A; N]
impl<A, B, const N: usize> PartialEq<&mut [B]> for [A; N]
where
A: PartialEq<B>,
{
#[inline]
fn eq(&self, other: &&'b mut [B]) -> bool {
fn eq(&self, other: &&mut [B]) -> bool {
self[..] == other[..]
}
#[inline]
fn ne(&self, other: &&'b mut [B]) -> bool {
fn ne(&self, other: &&mut [B]) -> bool {
self[..] != other[..]
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'b, A, B, const N: usize> PartialEq<[A; N]> for &'b mut [B]
impl<A, B, const N: usize> PartialEq<[A; N]> for &mut [B]
where
B: PartialEq<A>,
{
Expand Down

0 comments on commit 5058cad

Please sign in to comment.