Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Nov 29, 2024
1 parent 018490a commit 7a2d9f6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/diagnostic_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl<'a> ErrorKind<'a> {
}
}

impl<'a> std::fmt::Debug for ErrorKind<'a> {
impl std::fmt::Debug for ErrorKind<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ErrorKind::Diagnostic(d) => d.fmt(f),
Expand All @@ -79,7 +79,7 @@ impl<'a> std::fmt::Debug for ErrorKind<'a> {
}
}

impl<'a> std::fmt::Display for ErrorKind<'a> {
impl std::fmt::Display for ErrorKind<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ErrorKind::Diagnostic(d) => d.fmt(f),
Expand Down
10 changes: 5 additions & 5 deletions src/eyreish/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ where
lifetime: PhantomData<&'a T>,
}

impl<'a, T> Copy for Ref<'a, T> where T: ?Sized {}
impl<T> Copy for Ref<'_, T> where T: ?Sized {}

impl<'a, T> Clone for Ref<'a, T>
impl<T> Clone for Ref<'_, T>
where
T: ?Sized,
{
Expand Down Expand Up @@ -110,9 +110,9 @@ where
lifetime: PhantomData<&'a mut T>,
}

impl<'a, T> Copy for Mut<'a, T> where T: ?Sized {}
impl<T> Copy for Mut<'_, T> where T: ?Sized {}

impl<'a, T> Clone for Mut<'a, T>
impl<T> Clone for Mut<'_, T>
where
T: ?Sized,
{
Expand Down Expand Up @@ -142,7 +142,7 @@ where
}
}

impl<'a, T> Mut<'a, T> {
impl<T> Mut<'_, T> {
pub(crate) unsafe fn read(self) -> T {
self.ptr.as_ptr().read()
}
Expand Down
2 changes: 1 addition & 1 deletion src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl From<&str> for Box<dyn Diagnostic> {
}
}

impl<'a> From<&str> for Box<dyn Diagnostic + Send + Sync + 'a> {
impl From<&str> for Box<dyn Diagnostic + Send + Sync + '_> {
fn from(s: &str) -> Self {
From::from(String::from(s))
}
Expand Down
4 changes: 2 additions & 2 deletions src/source_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl SourceCode for [u8] {
}
}

impl<'src> SourceCode for &'src [u8] {
impl SourceCode for &[u8] {
fn read_span<'a>(
&'a self,
span: &SourceSpan,
Expand Down Expand Up @@ -139,7 +139,7 @@ impl SourceCode for str {
}

/// Makes `src: &'static str` or `struct S<'a> { src: &'a str }` usable.
impl<'s> SourceCode for &'s str {
impl SourceCode for &str {
fn read_span<'a>(
&'a self,
span: &SourceSpan,
Expand Down

0 comments on commit 7a2d9f6

Please sign in to comment.