Clippy sweep: clean across the workspace

- Box the oversized enum variants (Event::AccountRegistered, gossip
  Msg::Entry) so small events aren't sized to a full Account; serde is
  transparent so the wire/log format is unchanged.
- Use the configured server description in the SERVER line (it was
  hardcoded and the config field went unread).
- Derive the ChanServ SET label from the ChanSetting (drops toggle's 8th
  arg); rename inspircd from_us -> sourced.
- allow the two framework-idiom lints with rationale (tonic's Status in
  authorize; the guest-rename handler's inherent arg count).
- Auto-fixed map_or/contains/split_once style lints.
This commit is contained in:
Jean Chevronnet 2026-07-13 23:30:51 +00:00
parent 790ec51b28
commit 2fd5676ff2
No known key found for this signature in database
9 changed files with 71 additions and 44 deletions

View file

@ -35,7 +35,9 @@ enum Msg {
#[serde(default)]
reply: bool,
},
Entry { entry: LogEntry },
// Boxed: a LogEntry carries an Event, whose largest variant dwarfs the other
// Msg variants.
Entry { entry: Box<LogEntry> },
}
// Start the listener (if bound) and a dialer per configured peer. When TLS is
@ -203,7 +205,7 @@ where
loop {
match rx.recv().await {
Ok(entry) => {
if send(&tx, &Msg::Entry { entry }).await.is_err() {
if send(&tx, &Msg::Entry { entry: Box::new(entry) }).await.is_err() {
break;
}
}
@ -229,7 +231,7 @@ where
Ok(Msg::Digest { versions, reply }) => {
let missing = engine.lock().await.gossip_missing(&versions);
for entry in missing {
let _ = send(&tx, &Msg::Entry { entry }).await;
let _ = send(&tx, &Msg::Entry { entry: Box::new(entry) }).await;
}
if reply {
let versions = engine.lock().await.gossip_digest();
@ -237,7 +239,7 @@ where
}
}
Ok(Msg::Entry { entry }) => {
if let Err(e) = engine.lock().await.gossip_ingest(entry) {
if let Err(e) = engine.lock().await.gossip_ingest(*entry) {
tracing::warn!(%e, "gossip ingest failed");
}
}