Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix clippy lints #744

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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