Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts committed Nov 11, 2020
1 parent de9ce52 commit 6daa700
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/listener/tcp_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ where
assert!(self.server.is_none(), "`bind` should only be called once");
self.server = Some(server);

if let None = self.listener {
if self.listener.is_none() {
let addrs = self
.addrs
.take()
Expand Down
2 changes: 1 addition & 1 deletion src/listener/unix_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ where
assert!(self.server.is_none(), "`bind` should only be called once");
self.server = Some(server);

if let None = self.listener {
if self.listener.is_none() {
let path = self.path.take().expect("`bind` should only be called once");
let listener = net::UnixListener::bind(path).await?;
self.listener = Some(listener);
Expand Down

0 comments on commit 6daa700

Please sign in to comment.