diff --git a/src/client/data/config.rs b/src/client/data/config.rs index 03546e4..d7ab6f9 100644 --- a/src/client/data/config.rs +++ b/src/client/data/config.rs @@ -399,11 +399,10 @@ impl Config { /// Gets the nickname specified in the configuration. pub fn nickname(&self) -> Result<&str> { - self.nickname.as_deref() - .ok_or_else(|| InvalidConfig { - path: self.path(), - cause: ConfigError::NicknameNotSpecified, - }) + self.nickname.as_deref().ok_or_else(|| InvalidConfig { + path: self.path(), + cause: ConfigError::NicknameNotSpecified, + }) } /// Gets the bot's nickserv password specified in the configuration. @@ -436,11 +435,10 @@ impl Config { /// Gets the address of the server specified in the configuration. pub fn server(&self) -> Result<&str> { - self.server.as_deref() - .ok_or_else(|| InvalidConfig { - path: self.path(), - cause: ConfigError::ServerNotSpecified, - }) + self.server.as_deref().ok_or_else(|| InvalidConfig { + path: self.path(), + cause: ConfigError::ServerNotSpecified, + }) } /// Gets the port of the server specified in the configuration. diff --git a/src/client/mod.rs b/src/client/mod.rs index ef26081..db4abb7 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -1305,7 +1305,6 @@ mod test { .await?; let res = client.stream()?.try_collect::>().await; if let Err(Error::NoUsableNick) = res { - } else { panic!("expected error when no valid nicks were specified") } diff --git a/src/client/transport.rs b/src/client/transport.rs index 7f7965c..67fe1a6 100644 --- a/src/client/transport.rs +++ b/src/client/transport.rs @@ -118,7 +118,14 @@ impl Future for Pinger { } } - if self.as_mut().project().ping_interval.poll_tick(cx).is_ready() && *self.as_mut().project().enabled { + if self + .as_mut() + .project() + .ping_interval + .poll_tick(cx) + .is_ready() + && *self.as_mut().project().enabled + { self.as_mut().send_ping()?; }