Run cargo fmt

This commit is contained in:
Hyeon Kim 2023-06-04 01:16:14 +09:00
parent 781cbab4a4
commit a9b1ea3946
No known key found for this signature in database
GPG key ID: 0F85F46EE242057F
3 changed files with 16 additions and 12 deletions

View file

@ -399,8 +399,7 @@ impl Config {
/// Gets the nickname specified in the configuration.
pub fn nickname(&self) -> Result<&str> {
self.nickname.as_deref()
.ok_or_else(|| InvalidConfig {
self.nickname.as_deref().ok_or_else(|| InvalidConfig {
path: self.path(),
cause: ConfigError::NicknameNotSpecified,
})
@ -436,8 +435,7 @@ 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 {
self.server.as_deref().ok_or_else(|| InvalidConfig {
path: self.path(),
cause: ConfigError::ServerNotSpecified,
})

View file

@ -1305,7 +1305,6 @@ mod test {
.await?;
let res = client.stream()?.try_collect::<Vec<_>>().await;
if let Err(Error::NoUsableNick) = res {
} else {
panic!("expected error when no valid nicks were specified")
}

View file

@ -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()?;
}