swarm-derive/: Do not default out_event
to ()
when event_process=false
#2373
Labels
difficulty:moderate
getting-started
Issues that can be tackled if you don't know the internals of libp2p very well
help wanted
By default the
NetworkBehaviour
derive macroout_event
attribute is()
. This makes sense when theevent_process
attribute is set totrue
, though with #2214 theNetworkBehaviour
derive macroevent_process
attribute isfalse
by default. Not processing the event (event_process=false
) and setting an empty out event (()
) defeats the purpose of the event mechanism of theNetworkBehaviour
trait.I suggest requiring a user to set
out_event
to a customenum
whenevent_process
isfalse
.This has been raised by @thomaseizinger in #2361 (comment).
The text was updated successfully, but these errors were encountered: