refactor: must_use annotation for gossip::Builder
Not all use cases will involve sending messages (some will only want to subscribe to messages) which might result in someone dropping the handle they're not expecting to use.pull/24376/head
parent
117d70d807
commit
adad6bb631
|
@ -40,6 +40,7 @@ where
|
|||
///
|
||||
/// This call spawns a tokio task, and as such must be called from within a
|
||||
/// tokio runtime.
|
||||
#[must_use = "gossip reactor stops when handle drops"]
|
||||
pub fn build(self, socket: UdpSocket) -> GossipHandle {
|
||||
// Obtain a channel to communicate between the actor, and all handles
|
||||
let (tx, rx) = mpsc::channel(1000);
|
||||
|
|
Loading…
Reference in New Issue