Skip to content

Commit

Permalink
address clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
rgbkrk committed Dec 13, 2024
1 parent afa1b33 commit 38a5367
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/fair_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ impl<S, K: Clone + Eq + Hash> QueueInner<S, K> {
priority: self.counter.fetch_add(1, atomic::Ordering::Relaxed),
key: k,
});
match &self.waker {
Some(w) => w.wake_by_ref(),
None => (),
};
if let Some(w) = &self.waker {
w.wake_by_ref();
}
}

pub fn remove(&mut self, k: &K) {
Expand Down
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ impl SocketOptions {
pub trait MultiPeerBackend: SocketBackend {
/// This should not be public..
/// Find a better way of doing this
async fn peer_connected(self: Arc<Self>, peer_id: &PeerIdentity, io: FramedIo);

fn peer_disconnected(&self, peer_id: &PeerIdentity);
}

Expand All @@ -211,6 +211,7 @@ pub trait SocketSend {
/// in [proxy] function as a capture parameter
pub trait CaptureSocket: SocketSend {}

#[allow(clippy::empty_line_after_outer_attr)]
#[async_trait]
pub trait Socket: Sized + Send {
fn new() -> Self {
Expand Down Expand Up @@ -333,11 +334,11 @@ pub trait Socket: Sized + Send {
/// # Errors
/// May give a `ZmqError::NoSuchConnection` if `endpoint` isn't connected.
/// May also give any other zmq errors encountered when attempting to
/// disconnect.
/// disconnect
// TODO: async fn disconnect(&mut self, endpoint: impl TryIntoEndpoint + 'async_trait) ->
// ZmqResult<()>;

/// Disconnects all connecttions, blocking until finished.
/// Disconnects all connections, blocking until finished.
// TODO: async fn disconnect_all(&mut self) -> ZmqResult<()>;

/// Closes the socket, blocking until all associated binds are closed.
Expand Down

0 comments on commit 38a5367

Please sign in to comment.