Skip to content

Commit 886dd7f

Browse files
committed
Fix clippy and remove CI hacks
1 parent bd030d9 commit 886dd7f

File tree

6 files changed

+9
-16
lines changed

6 files changed

+9
-16
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ jobs:
2626
uses: Swatinem/rust-cache@v2
2727

2828
- name: Run clippy
29-
#!! Remove `-A clippy::result_large_err` once this is on `next`. This is to
30-
#!! temporarily allow Clippy CI to run on `current`
31-
run: cargo clippy --workspace --tests --features full -- -A clippy::result_large_err -D warnings --cfg ignore_serenity_deprecated
29+
run: cargo clippy --workspace --tests --features full -- -D warnings --cfg ignore_serenity_deprecated
3230

3331
rustfmt:
3432
name: Format

Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ edition = "2024"
2727
rust-version = "1.85"
2828

2929
[dependencies]
30-
#!! Downgrade to versions still supporting v1.74.0
31-
#!! Make sure to remove on `next`
32-
litemap = "=0.7.4"
33-
zerofrom = "=0.1.5"
34-
3530
# Required dependencies
3631
bitflags = "2.4.2"
3732
serde_json = { version = "1.0.108", features = ["raw_value"] }

src/cache/event.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,10 @@ impl CacheUpdate for ChannelCreateEvent {
4040
type Output = GuildChannel;
4141

4242
fn update(&mut self, cache: &Cache) -> Option<Self::Output> {
43-
let old_channel = cache
43+
cache
4444
.guilds
4545
.get_mut(&self.channel.guild_id)
46-
.and_then(|mut g| g.channels.insert(self.channel.clone()));
47-
48-
old_channel
46+
.and_then(|mut g| g.channels.insert(self.channel.clone()))
4947
}
5048
}
5149

src/gateway/sharding/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,9 @@ impl Shard {
442442
Ok(GatewayEvent::Dispatch {
443443
seq,
444444
event,
445-
}) => self.handle_gateway_dispatch(seq, &event).map(|e| Some(ShardAction::Dispatch(e))),
445+
}) => self
446+
.handle_gateway_dispatch(seq, &event)
447+
.map(|e| Some(ShardAction::Dispatch(Box::new(e)))),
446448
Ok(GatewayEvent::Heartbeat) => {
447449
info!("[{:?}] Received shard heartbeat", self.shard_info);
448450

@@ -762,7 +764,7 @@ pub enum ShardAction {
762764
Heartbeat,
763765
Identify,
764766
Reconnect,
765-
Dispatch(Event),
767+
Dispatch(Box<Event>),
766768
}
767769

768770
/// Information about a [`ShardRunner`].

src/gateway/sharding/shard_runner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl ShardRunner {
215215
spawn_named(
216216
"shard_runner::dispatch",
217217
dispatch_model(
218-
event,
218+
*event,
219219
context,
220220
#[cfg(feature = "framework")]
221221
self.framework.clone(),

src/http/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2235,7 +2235,7 @@ impl Http {
22352235
self.execute_webhook_(webhook_id, thread_id, token, wait, files, map, true).await
22362236
}
22372237

2238-
#[allow(clippy::too_many_arguments)]
2238+
#[expect(clippy::too_many_arguments)]
22392239
async fn execute_webhook_(
22402240
&self,
22412241
webhook_id: WebhookId,

0 commit comments

Comments
 (0)