openwsn-berkeley / lakers

EDHOC implemented in Rust, optimized for microcontrollers, with bindings for C and Python.
https://crates.io/crates/lakers
BSD 3-Clause "New" or "Revised" License
13 stars 10 forks source link

Avoid empty return on the err side of a Result #209

Closed geonnave closed 7 months ago

geonnave commented 8 months ago

For example here the code looks like this:

pub fn new_from_slice(slice: &[u8]) -> Result<Self, ()> {

This and similar occurrences where () is used in the error side should be refactored to use an explicit error type.