bltavares / colmeia

Attempt to make an interop layer to connect to dat on hyperswarm in Rust
24 stars 4 forks source link

Remove all unwrap and expects and add error handling #8

Closed bltavares closed 4 years ago

bltavares commented 4 years ago

Nowadays, colmeia-sync and ffi panics when it tries to talk to itself, when the socket closes and the writer fails.

It would be nice to remove all unwraps and expect and change signatures to return errors as needed.

Ideally, ProtocolEvents should have a associated error type to allow use of other errors by the consumer of the trait.