lemunozm / message-io

Fast and easy-to-use event-driven network library.
Apache License 2.0
1.12k stars 75 forks source link

Network::remove() returns bool #56

Closed lemunozm closed 3 years ago

lemunozm commented 3 years ago

Change returning value of Network::remove() from <Option<()> to bool.

Rationale: Removing a connected connection could return None in the previous version of remove if just a disconnection happens. The user probably will use .unwrap() on it adding a potential bug. Changing from Option<()> to bool avoid this usage.