mheese / rust-pkcs11

Rust PKCS#11 Library
Apache License 2.0
75 stars 33 forks source link

errors: Print the actual CKR_ value, not its address #39

Closed woodruffw closed 4 years ago

woodruffw commented 4 years ago

This fixes a small oversight in error printing: the current code prints the address of the variable holding the CKR_ value rather than the CKR_ value itself.

codecov-commenter commented 4 years ago

Codecov Report

Merging #39 into master will decrease coverage by 0.02%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
- Coverage   65.43%   65.41%   -0.03%     
==========================================
  Files           4        4              
  Lines        3446     3444       -2     
==========================================
- Hits         2255     2253       -2     
  Misses       1191     1191              
Impacted Files Coverage Δ
src/errors.rs 0.00% <0.00%> (ø)
src/lib.rs 65.12% <0.00%> (-0.04%) :arrow_down:
src/tests.rs 80.41% <0.00%> (-0.02%) :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 d66fee4...bd50cbb. Read the comment docs.

woodruffw commented 4 years ago

Potentially jumped the gun here: I was seeing error codes that looked like pointers, but CK_RV boils down to usize and err vs *err shouldn't matter for that. I'll keep digging.