diff --git a/src/common.rs b/src/common.rs index cafdd76..7fe0c40 100644 --- a/src/common.rs +++ b/src/common.rs @@ -27,7 +27,7 @@ impl<'a> Text<'a> for &'a str { type Value = Self; } -impl<'a> Text<'a> for String { +impl Text<'_> for String { type Value = String; } diff --git a/src/format.rs b/src/format.rs index de24163..89a3f70 100644 --- a/src/format.rs +++ b/src/format.rs @@ -47,7 +47,7 @@ pub(crate) trait Displayable { fn display(&self, f: &mut Formatter); } -impl<'a> Formatter<'a> { +impl Formatter<'_> { pub fn new(style: &Style) -> Formatter { Formatter { buf: String::with_capacity(1024), diff --git a/src/query/ast.rs b/src/query/ast.rs index 1be1c7f..973b5cf 100644 --- a/src/query/ast.rs +++ b/src/query/ast.rs @@ -14,7 +14,7 @@ pub struct Document<'a, T: Text<'a>> { pub definitions: Vec>, } -impl<'a> Document<'a, String> { +impl Document<'_, String> { pub fn into_static(self) -> Document<'static, String> { // To support both reference and owned values in the AST, // all string data is represented with the ::common::Str<'a, T: Text<'a>> diff --git a/src/schema/ast.rs b/src/schema/ast.rs index db2908f..b7e919f 100644 --- a/src/schema/ast.rs +++ b/src/schema/ast.rs @@ -10,7 +10,7 @@ pub struct Document<'a, T: Text<'a>> { pub definitions: Vec>, } -impl<'a> Document<'a, String> { +impl Document<'_, String> { pub fn into_static(self) -> Document<'static, String> { // To support both reference and owned values in the AST, // all string data is represented with the ::common::Str<'a, T: Text<'a>> diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 3721eb4..9e06319 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -68,13 +68,13 @@ impl<'a> StreamOnce for TokenStream<'a> { } } -impl<'a> Positioned for TokenStream<'a> { +impl Positioned for TokenStream<'_> { fn position(&self) -> Self::Position { self.position } } -impl<'a> ResetStream for TokenStream<'a> { +impl ResetStream for TokenStream<'_> { type Checkpoint = Checkpoint; fn checkpoint(&self) -> Self::Checkpoint { Checkpoint { @@ -357,7 +357,7 @@ impl<'a> TokenStream<'a> { } } -impl<'a> fmt::Display for Token<'a> { +impl fmt::Display for Token<'_> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}[{:?}]", self.value, self.kind) }