Skip to content

Commit 9bc709a

Browse files
committed
Fix lints
1 parent c87b8a0 commit 9bc709a

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ jobs:
5353
runs-on: ubuntu-latest
5454
steps:
5555
- uses: actions/checkout@v4
56-
- uses: actions/download-artifact@v4
56+
- uses: actions/download-artifact@v7
5757
with: {name: dist-macos-latest, path: dist}
58-
- uses: actions/download-artifact@v4
58+
- uses: actions/download-artifact@v7
5959
with: {name: dist-windows-latest, path: dist}
60-
- uses: actions/download-artifact@v4
60+
- uses: actions/download-artifact@v7
6161
with: {name: dist-ubuntu-latest, path: dist}
6262
- uses: udoprog/kick@nightly
6363
- run: kick github-release --upload "dist/*" --github-action

bot/src/module/gtav.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ impl Handler {
663663
}
664664
}
665665

666-
remaining.sort_by(|a, b| b.1.cmp(&a.1));
666+
remaining.sort_by_key(|v| v.1);
667667

668668
match remaining.into_iter().next() {
669669
Some((name, remaining)) => Some((name, remaining)),

bot/src/module/poll.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl ActivePoll {
132132
));
133133
}
134134

135-
results.sort_by(|a, b| b.1.cmp(&a.1));
135+
results.sort_by_key(|v| v.1);
136136
results
137137
}
138138
}

bot/src/module/promotions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ struct PromoData<'a> {
153153

154154
/// Pick the best promo.
155155
fn pick(mut promotions: Vec<Arc<db::Promotion>>) -> Option<Arc<db::Promotion>> {
156-
promotions.sort_by(|a, b| a.promoted_at.cmp(&b.promoted_at));
156+
promotions.sort_by_key(|v| v.promoted_at);
157157

158158
let now = Utc::now();
159159

bot/src/updater.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub(crate) fn updater(
4242
Some(cache) => cache.wrap(String::from("updater/version"), chrono::Duration::hours(1), future).await?,
4343
};
4444

45-
releases.sort_by(|a, b| b.published_at.cmp(&a.published_at));
45+
releases.sort_by_key(|v| v.published_at);
4646

4747
let release = match releases.into_iter().find(|r| !r.prerelease) {
4848
Some(release) => release,

crates/oxidize-settings/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub enum Error {
4646
MigrationIncompatible {
4747
from: String,
4848
to: String,
49-
ty: Type,
49+
ty: Box<Type>,
5050
json: String,
5151
},
5252
#[error("{0}")]
@@ -484,7 +484,7 @@ where
484484
return Err(Error::MigrationIncompatible {
485485
from: from_key.to_string(),
486486
to: to_key.to_string(),
487-
ty: to.schema.ty.clone(),
487+
ty: Box::new(to.schema.ty.clone()),
488488
json: serde_json::to_string(&from)?,
489489
});
490490
}

0 commit comments

Comments
 (0)