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 4, 2024
1 parent 1f32350 commit 7f61ce2
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion crates/tabby-common/src/api/structured_doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ fn get_json_field<'a>(

fn get_json_bool_field(doc: &TantivyDocument, field: schema::Field, name: &str) -> bool {
if let Some(field) = get_json_field(doc, field, name) {
return field.as_bool().unwrap_or_default();
field.as_bool().unwrap_or_default()

Check warning on line 228 in crates/tabby-common/src/api/structured_doc.rs

View check run for this annotation

Codecov / codecov/patch

crates/tabby-common/src/api/structured_doc.rs#L227-L228

Added lines #L227 - L228 were not covered by tests
} else {
false

Check warning on line 230 in crates/tabby-common/src/api/structured_doc.rs

View check run for this annotation

Codecov / codecov/patch

crates/tabby-common/src/api/structured_doc.rs#L230

Added line #L230 was not covered by tests
}
Expand Down
2 changes: 1 addition & 1 deletion crates/tabby-common/src/index/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ impl IndexSchema {
(
Occur::Must,
Box::new(ExistsQuery::new_exists_query(
format!("{}.{}", FIELD_ATTRIBUTES, field).into(),
format!("{}.{}", FIELD_ATTRIBUTES, field),
)),
),
])
Expand Down
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
6 changes: 3 additions & 3 deletions crates/tabby-index/src/indexer_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,16 @@ mod structured_doc_tests {

let updated_at = chrono::Utc::now();
let res = tokio::runtime::Runtime::new().unwrap().block_on(async {
let updated = indexer

indexer
.sync(
StructuredDocState {
updated_at,
deleted: false,
},
doc,
)
.await;
updated
.await
});
assert!(res);
indexer.commit();
Expand Down

0 comments on commit 7f61ce2

Please sign in to comment.