Run cargo fmt
This commit is contained in:
parent
781cbab4a4
commit
a9b1ea3946
3 changed files with 16 additions and 12 deletions
|
@ -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,
|
||||
})
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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()?;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue