diff --git a/src/api/check.rs b/src/api/check.rs index 230298b..6d8f2ba 100644 --- a/src/api/check.rs +++ b/src/api/check.rs @@ -239,7 +239,7 @@ pub struct Data<'source> { pub annotation: Vec>, } -impl<'source> IntoStatic for Data<'source> { +impl IntoStatic for Data<'_> { type Static = Data<'static>; fn into_static(self) -> Self::Static { Data { @@ -960,7 +960,7 @@ pub struct ResponseWithContext<'source> { pub text_length: usize, } -impl<'source> Deref for ResponseWithContext<'source> { +impl Deref for ResponseWithContext<'_> { type Target = Response; fn deref(&self) -> &Self::Target { &self.response @@ -1104,7 +1104,7 @@ where } } -impl<'source, 'response, T: Iterator + 'response> MatchPositions<'source, 'response, T> { +impl<'response, T: Iterator + 'response> MatchPositions<'_, 'response, T> { /// Set the line number to a given value. /// /// By default, the first line number is 1. diff --git a/src/api/server.rs b/src/api/server.rs index e502323..495d380 100644 --- a/src/api/server.rs +++ b/src/api/server.rs @@ -453,9 +453,9 @@ impl ServerClient { /// Send a check request to the server, await for the response and annotate /// it. #[cfg(feature = "annotate")] - pub async fn annotate_check<'source>( + pub async fn annotate_check( &self, - request: &Request<'source>, + request: &Request<'_>, origin: Option<&str>, color: bool, ) -> Result { diff --git a/src/cli/check.rs b/src/cli/check.rs index 6fd492a..f040dd5 100644 --- a/src/cli/check.rs +++ b/src/cli/check.rs @@ -257,7 +257,7 @@ pub struct CliRequest { pub level: Level, } -impl<'source> From for Request<'source> { +impl From for Request<'_> { fn from(val: CliRequest) -> Self { Request { text: val.text.map(Cow::Owned), @@ -396,7 +396,7 @@ pub struct CliData { pub annotation: Vec, } -impl<'source> From for Data<'source> { +impl From for Data<'_> { fn from(val: CliData) -> Self { Data { annotation: val @@ -428,7 +428,7 @@ pub struct CliDataAnnotation { pub interpret_as: Option, } -impl<'source> From for DataAnnotation<'source> { +impl From for DataAnnotation<'_> { fn from(val: CliDataAnnotation) -> Self { DataAnnotation { text: val.text.map(Cow::Owned), diff --git a/tests/match_positions.rs b/tests/match_positions.rs index 077174e..cc5d814 100644 --- a/tests/match_positions.rs +++ b/tests/match_positions.rs @@ -1,5 +1,4 @@ use languagetool_rust::api::{check, server::ServerClient}; -use std::borrow::Cow; #[macro_export] macro_rules! test_match_positions {