Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Dec 5, 2024
1 parent 00a39c6 commit d93ac50
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/tabby-common/src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl<'a> InfoMessage<'a> {
}
}

impl<'a> ToString for InfoMessage<'a> {
impl ToString for InfoMessage<'_> {
fn to_string(&self) -> String {
let mut str = String::new();
str.push_str(&format!(" {}\n\n", self.header_format.format(self.header)));
Expand Down
4 changes: 2 additions & 2 deletions crates/tabby-git/src/grep/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ pub struct GrepMatchSink<'output, 'a> {
matcher: &'a RegexMatcher,
}

impl<'output, 'a> Sink for GrepMatchSink<'output, 'a> {
impl Sink for GrepMatchSink<'_, '_> {
type Error = std::io::Error;

fn matched(
Expand Down Expand Up @@ -201,7 +201,7 @@ pub struct GrepNegativeMatchSink<'output> {
output: &'output mut GrepOutput,
}

impl<'output> Sink for GrepNegativeMatchSink<'output> {
impl Sink for GrepNegativeMatchSink<'_> {
type Error = std::io::Error;

fn matched(
Expand Down
4 changes: 2 additions & 2 deletions crates/tabby-index-cli/src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub struct OpenTimer<'a> {
depth: u32,
}

impl<'a> OpenTimer<'a> {
impl OpenTimer<'_> {
/// Starts timing a new named subtask
///
/// The timer is stopped automatically
Expand All @@ -23,7 +23,7 @@ impl<'a> OpenTimer<'a> {
}
}

impl<'a> Drop for OpenTimer<'a> {
impl Drop for OpenTimer<'_> {
fn drop(&mut self) {
self.timer_tree.timings.push(Timing {
name: self.name,
Expand Down
2 changes: 1 addition & 1 deletion ee/tabby-db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ mod invitations;
mod job_runs;
#[cfg(test)]
mod migration_tests;
mod notifications;
mod oauth_credential;
mod password_reset;
mod provided_repositories;
Expand All @@ -45,7 +46,6 @@ mod user_events;
mod user_groups;
mod users;
mod web_documents;
mod notifications;

use anyhow::Result;
use sql_query_builder as sql;
Expand Down
5 changes: 2 additions & 3 deletions ee/tabby-db/src/notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ impl DbConn {

#[cfg(test)]
mod tests {
use crate::testutils;

use super::*;
use crate::testutils;

/// Smoke test to ensure sql query is valid, actual functionality test shall happens at service level.
#[tokio::test]
Expand All @@ -79,4 +78,4 @@ mod tests {
let notifications = db.list_notifications_within_7days(user1).await.unwrap();
assert!(notifications.is_empty())
}
}
}

0 comments on commit d93ac50

Please sign in to comment.