Skip to content

Commit

Permalink
fix: satisfy clippy pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Rolv-Apneseth committed Nov 1, 2024
1 parent befbc52 commit c7d342c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/api/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ pub struct Data<'source> {
pub annotation: Vec<DataAnnotation<'source>>,
}

impl<'source> IntoStatic for Data<'source> {
impl IntoStatic for Data<'_> {
type Static = Data<'static>;
fn into_static(self) -> Self::Static {
Data {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/api/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> {
Expand Down
6 changes: 3 additions & 3 deletions src/cli/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ pub struct CliRequest {
pub level: Level,
}

impl<'source> From<CliRequest> for Request<'source> {
impl From<CliRequest> for Request<'_> {
fn from(val: CliRequest) -> Self {
Request {
text: val.text.map(Cow::Owned),
Expand Down Expand Up @@ -396,7 +396,7 @@ pub struct CliData {
pub annotation: Vec<CliDataAnnotation>,
}

impl<'source> From<CliData> for Data<'source> {
impl From<CliData> for Data<'_> {
fn from(val: CliData) -> Self {
Data {
annotation: val
Expand Down Expand Up @@ -428,7 +428,7 @@ pub struct CliDataAnnotation {
pub interpret_as: Option<String>,
}

impl<'source> From<CliDataAnnotation> for DataAnnotation<'source> {
impl From<CliDataAnnotation> for DataAnnotation<'_> {
fn from(val: CliDataAnnotation) -> Self {
DataAnnotation {
text: val.text.map(Cow::Owned),
Expand Down
1 change: 0 additions & 1 deletion tests/match_positions.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use languagetool_rust::api::{check, server::ServerClient};
use std::borrow::Cow;

#[macro_export]
macro_rules! test_match_positions {
Expand Down

0 comments on commit c7d342c

Please sign in to comment.