AeroRust / nmea

NMEA 0183 - for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GNSS receivers and many other types of instruments. Defined and controlled by the National Marine Electronics Association (NMEA)
https://crates.io/crates/nmea
Other
60 stars 41 forks source link

Implement Display+Error for NmeaError #35

Closed afonso360 closed 2 years ago

afonso360 commented 2 years ago

Hey! πŸ‘‹

I'm trying to use this crate and have the errors propagated up. It looks like Error is not implemented for NmeaError, so here is a PR to fix that.

We implement Display unconditionally for NmeaError, and std::error::Errorwhen working in a std environment.

To distinguish between no_std and std we add an optional but enabled by default std feature. As far as I can tell, rust doesn't yet have a proper way to do this...

codecov[bot] commented 2 years ago

Codecov Report

Merging #35 (273cc54) into master (dcadb6c) will decrease coverage by 0.90%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #35      +/-   ##
==========================================
- Coverage   85.65%   84.75%   -0.91%     
==========================================
  Files          12       12              
  Lines         941      951      +10     
==========================================
  Hits          806      806              
- Misses        135      145      +10     
Impacted Files Coverage Ξ”
src/parse.rs 71.92% <0.00%> (-15.31%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update dcadb6c...273cc54. Read the comment docs.

Dushistov commented 2 years ago

Thank you for PR.