mirror of https://github.com/zkat/miette.git
fix(clippy): elide lifetimes (#423)
This commit is contained in:
parent
b8c144f2a6
commit
9ba6fad769
|
|
@ -74,7 +74,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),
|
||||
|
|
@ -83,7 +83,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),
|
||||
|
|
|
|||
|
|
@ -69,9 +69,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,
|
||||
{
|
||||
|
|
@ -132,9 +132,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,
|
||||
{
|
||||
|
|
@ -173,7 +173,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> Mut<'a, T> {
|
||||
impl<T> Mut<'_, T> {
|
||||
pub(crate) unsafe fn read(self) -> T {
|
||||
self.ptr.as_ptr().read()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ impl SourceCode for [u8] {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'src> SourceCode for &'src [u8] {
|
||||
impl SourceCode for &[u8] {
|
||||
fn read_span<'a>(
|
||||
&'a self,
|
||||
span: &SourceSpan,
|
||||
|
|
@ -143,7 +143,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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue