Skip to content

Commit

Permalink
Quiet warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
spb committed Oct 16, 2024
1 parent fb29248 commit 472cc93
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 64 deletions.
1 change: 1 addition & 0 deletions sable_ircd/src/command/client_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ pub struct ClientCommand {
/// Arguments supplied
pub args: Vec<String>,
/// Tags provided by the client
#[expect(unused)]
pub tags: InboundTagSet,

// The response sink. labeled-response requires that this lives for the whole
Expand Down
15 changes: 0 additions & 15 deletions sable_ircd/src/command/handlers/async_wait.rs

This file was deleted.

29 changes: 0 additions & 29 deletions sable_ircd/src/command/handlers/sping.rs

This file was deleted.

2 changes: 1 addition & 1 deletion sable_ircd/src/command/handlers/tagmsg.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::*;

/// Minimal implementation of TAGMSG that just drops everything, so we can safely
/// implement https://ircv3.net/specs/extensions/message-tags
/// implement <https://ircv3.net/specs/extensions/message-tags>
///
/// `CLIENTTAGDENY=*` tells clients we would drop all tags, anyway.
#[command_handler("TAGMSG")]
Expand Down
2 changes: 1 addition & 1 deletion sable_ircd/src/command/handlers/whowas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const DEFAULT_COUNT: usize = 8; // Arbitrary value, that happens to match the ca
// historic_nick_users

#[command_handler("WHOWAS")]
/// Syntax: WHOIS <target> [<count>]
/// Syntax: WHOWAS \<target\> \[\<count\>\]
fn whowas_handler(
network: &Network,
response: &dyn CommandResponse,
Expand Down
6 changes: 0 additions & 6 deletions sable_ircd/src/command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,4 @@ mod handlers {

// Services compatibility command layer
mod services;

// Dev/test tools
#[cfg(debug)]
mod async_wait;
#[cfg(debug)]
mod sping;
}
1 change: 1 addition & 0 deletions sable_ircd/src/command/plumbing/source_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub struct UserSource<'a> {
pub struct PreClientSource(pub Arc<PreClient>);
pub struct LoggedInUserSource<'a> {
pub user: wrapper::User<'a>,
#[expect(unused)]
pub user_connection: wrapper::UserConnection<'a>,
pub account: wrapper::Account<'a>,
}
Expand Down
2 changes: 2 additions & 0 deletions sable_ircd/src/command/plumbing/target_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ impl<'a> PositionalArgument<'a> for TargetParameter<'a> {
}

pub struct RegisteredChannel<'a> {
#[expect(unused)]
pub channel: wrapper::Channel<'a>,
#[expect(unused)]
pub registration: wrapper::ChannelRegistration<'a>,
}

Expand Down
2 changes: 1 addition & 1 deletion sable_ircd/src/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl MonitorSet {
/// Trait of [`NetworkStateChange`] details that are relevant to connections using
/// [IRCv3 MONITOR](https://ircv3.net/specs/extensions/monitor) to monitor users.
pub(crate) trait MonitoredItem: std::fmt::Debug {
/// Same as [`try_notify_monitors`] but logs errors instead of returning `Result`.
/// Same as [`Self::try_notify_monitors`] but logs errors instead of returning `Result`.
fn notify_monitors(&self, server: &ClientServer) {
if let Err(e) = self.try_notify_monitors(server) {
tracing::error!("Error while notifying monitors of {:?}: {}", self, e);
Expand Down
4 changes: 2 additions & 2 deletions sable_macros/src/define_object_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct ObjectIdDefn {
typename: Ident,
_colon: Token![:],
contents: TypeTuple,
is_snowflake: Option<kw::snowflake>,
_is_snowflake: Option<kw::snowflake>,
_semi: Token![;],
}

Expand All @@ -28,7 +28,7 @@ impl Parse for ObjectIdDefn {
} else {
input.parse()?
},
is_snowflake: input.parse()?,
_is_snowflake: input.parse()?,
_semi: input.parse()?,
})
}
Expand Down
2 changes: 1 addition & 1 deletion sable_network/src/network/network/accessors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl Network {
pub fn users_by_nick_pattern<'a>(
&'a self,
pattern: &'a NicknameMatcher,
) -> impl Iterator<Item = wrapper::User> + 'a {
) -> impl Iterator<Item = wrapper::User<'a>> + 'a {
let pattern = std::rc::Rc::new(pattern);
let pattern2 = pattern.clone();
let alias_users = self
Expand Down
2 changes: 1 addition & 1 deletion sable_network/src/network/network/user_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl HistoricNickStore {
&'a self,
nick: &Nickname,
net: &'a Network,
) -> impl Iterator<Item = &HistoricUser> + 'a {
) -> impl Iterator<Item = &'a HistoricUser> + 'a {
self.data
.get(nick)
.map(move |vec| vec.iter().filter_map(move |id| net.historic_users.get(id)))
Expand Down
7 changes: 0 additions & 7 deletions sable_network/src/node/management.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
use super::*;

/// Statistics to be exported via the management interface
#[derive(serde::Serialize)]
struct ServerStatistics {
connected_clients: usize,
event_stats: crate::sync::EventLogStats,
}

impl NetworkNode {
pub async fn handle_management_command(&self, cmd: ServerManagementCommand) {
use ServerManagementCommandType::*;
Expand Down

0 comments on commit 472cc93

Please sign in to comment.