brndnmtthws / dryoc

Don't Roll Your Own Crypto: pure-Rust, hard to misuse cryptography library
https://docs.rs/dryoc
MIT License
267 stars 14 forks source link

Expose dryoc::error::Error & implement std's Error trait #3

Closed hedgehog1029 closed 2 years ago

hedgehog1029 commented 2 years ago

This PR exposes dryoc::error::Error as dryoc::Error so that it may be used in external error handling code, and implements std::error::Error.

codecov[bot] commented 2 years ago

Codecov Report

Merging #3 (6467bde) into main (52ad1c2) will increase coverage by 1.26%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main       #3      +/-   ##
==========================================
+ Coverage   81.60%   82.86%   +1.26%     
==========================================
  Files          43       43              
  Lines        4310     4277      -33     
==========================================
+ Hits         3517     3544      +27     
+ Misses        793      733      -60     
Impacted Files Coverage Δ
src/error.rs 14.28% <0.00%> (-19.05%) :arrow_down:
src/lib.rs 100.00% <ø> (ø)
tests/integration_tests.rs 100.00% <0.00%> (ø)
src/protected.rs 56.12% <0.00%> (+0.40%) :arrow_up:
src/dryocbox.rs 82.90% <0.00%> (+0.42%) :arrow_up:
src/argon2.rs 94.67% <0.00%> (+0.58%) :arrow_up:
src/poly1305.rs 98.93% <0.00%> (+1.04%) :arrow_up:
src/keypair.rs 58.22% <0.00%> (+1.43%) :arrow_up:
src/dryocstream.rs 88.69% <0.00%> (+1.51%) :arrow_up:
src/pwhash.rs 47.82% <0.00%> (+1.58%) :arrow_up:
... and 3 more

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 52ad1c2...6467bde. Read the comment docs.

brndnmtthws commented 2 years ago

Looks great, thanks for the PR. I think we can skip the unit tests for printing errors.

hedgehog1029 commented 2 years ago

just noticed that I accidentally removed the #![warn(missing_docs)] line in lib.rs, apologies!