Skip to content

Commit

Permalink
fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoIeni committed Oct 7, 2024
1 parent 499f576 commit e93af2b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub struct TransactionHandle<'a> {
transaction: Transaction<'a>,
}

impl<'a> TransactionHandle<'a> {
impl TransactionHandle<'_> {
pub fn commit(self) -> Fallible<()> {
self.transaction.commit()?;
Ok(())
Expand Down Expand Up @@ -235,7 +235,7 @@ impl QueryUtils for Database {
}
}

impl<'a> QueryUtils for TransactionHandle<'a> {
impl QueryUtils for TransactionHandle<'_> {
fn with_conn<T, F: FnOnce(&Connection) -> Fallible<T>>(&self, f: F) -> Fallible<T> {
f(&self.transaction)
}
Expand Down
2 changes: 1 addition & 1 deletion src/report/analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ mod tests {
results: fix_root,
};

let test_pass = ReportCrates::Plain(vec![crates.remove("test-pass").unwrap()]);
let test_pass = ReportCrates::Plain(vec![crates.swap_remove("test-pass").unwrap()]);

let mut categories = IndexMap::new();
categories.insert(Comparison::Regressed, regressed);
Expand Down
6 changes: 3 additions & 3 deletions src/results/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl<'a> DatabaseDB<'a> {
}
}

impl<'a> ReadResults for DatabaseDB<'a> {
impl ReadResults for DatabaseDB<'_> {
fn load_log(
&self,
ex: &Experiment,
Expand Down Expand Up @@ -189,7 +189,7 @@ impl<'a> ReadResults for DatabaseDB<'a> {
}
}

impl<'a> WriteResults for DatabaseDB<'a> {
impl WriteResults for DatabaseDB<'_> {
fn get_result(
&self,
ex: &Experiment,
Expand Down Expand Up @@ -251,7 +251,7 @@ impl crate::runner::RecordProgress for DatabaseDB<'_> {
}
}

impl<'a> DeleteResults for DatabaseDB<'a> {
impl DeleteResults for DatabaseDB<'_> {
fn delete_all_results(&self, ex: &Experiment) -> Fallible<()> {
self.db
.execute("DELETE FROM results WHERE experiment = ?1;", &[&ex.name])?;
Expand Down

0 comments on commit e93af2b

Please sign in to comment.