swarm: Remove NotifyHandler::All (#1880)

Remove `NotifyHandler::All` thus removing the requirement for events
send from a `NetworkBehaviour` to a `ProtocolsHandler` to be `Clone`. An
implementor of `NetworkBehaviour` can still notify all
`ProtocolHandler`s for a given peer by emitting one `NotifyHandler`
event per connection to that peer.
This commit is contained in:
Max Inden
2020-12-17 11:01:45 +01:00
committed by GitHub
parent 6c970f0dda
commit 22817b5d2b
5 changed files with 18 additions and 81 deletions

View File

@ -118,7 +118,7 @@ where
/// Request substream upgrade protocol.
///
/// Sends a request and receives a response.
#[derive(Debug, Clone)]
#[derive(Debug)]
pub struct RequestProtocol<TCodec>
where
TCodec: RequestResponseCodec