Skip to content

Commit fafe4e1

Browse files
Fix clippy lints
1 parent 9053459 commit fafe4e1

File tree

5 files changed

+6
-14
lines changed

5 files changed

+6
-14
lines changed

src/db/migrations.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,11 @@ fn migrations() -> Vec<(&'static str, MigrationKind)> {
164164

165165
t.execute("PRAGMA foreign_keys = OFF;", [])?;
166166
t.execute(
167-
&format!(
168-
"UPDATE experiments SET toolchain_start = {}(toolchain_start);",
169-
fn_name
170-
),
167+
&format!("UPDATE experiments SET toolchain_start = {fn_name}(toolchain_start);",),
171168
[],
172169
)?;
173170
t.execute(
174-
&format!(
175-
"UPDATE experiments SET toolchain_end = {}(toolchain_end);",
176-
fn_name
177-
),
171+
&format!("UPDATE experiments SET toolchain_end = {fn_name}(toolchain_end);",),
178172
[],
179173
)?;
180174
t.execute(

src/experiments.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,8 @@ impl Experiment {
622622
"SELECT crate FROM experiment_crates WHERE experiment = ?1
623623
AND skipped = 0
624624
AND status = 'queued'
625-
AND (started_at is null or started_at <= datetime('now', '-{} minutes'))
625+
AND (started_at is null or started_at <= datetime('now', '-{RUN_TIMEOUT} minutes'))
626626
LIMIT ?2;",
627-
RUN_TIMEOUT
628627
),
629628
rusqlite::params![self.name, limit],
630629
|r| r.get("crate"),

src/runner/worker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<'a, DB: WriteResults + Sync> Worker<'a, DB> {
7777
};
7878

7979
for err in e.iter_chain() {
80-
if let Some(&OverrideResult(ref res)) = err.downcast_ctx() {
80+
if let Some(OverrideResult(res)) = err.downcast_ctx() {
8181
result = res.clone();
8282
break;
8383
}

src/server/auth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ impl ACL {
135135
}
136136

137137
let mut orgs = HashMap::new();
138-
for &(ref org, ref team) in &self.teams {
138+
for (org, team) in &self.teams {
139139
if let Err(err) = self.load_team(github, &mut new_cache, &mut orgs, org, team) {
140140
warn!(
141141
"failed to authorize members of {}/{} to use the bot",

src/server/routes/webhooks/commands.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ pub fn run(
105105
message = message.line(
106106
"warning",
107107
format!(
108-
"Try build based on commit {}, but latest commit is {}. Did you forget to make a new try build?",
109-
old_pr_head, pr_head
108+
"Try build based on commit {old_pr_head}, but latest commit is {pr_head}. Did you forget to make a new try build?",
110109
),
111110
);
112111
}

0 commit comments

Comments
 (0)