Open
Description
stm32bluepill-mynewt-sensor/src/send_coap.rs
Lines 19 to 23 in f51e078
Immediatly as I saw the video in the medium post I shuddered.
Do proper error handling in Rust!
Don't return int
s to indicate errors or failures, use Result<(), ErrorType>
instead. This is just one place, but everywhere where you have those ghastly assert!(rc == 0)
things, throw them away and burn them! Either use unwrap
, or better expect
.
Metadata
Metadata
Assignees
Labels
No labels