uutils / findutils

Rust implementation of findutils
MIT License
309 stars 38 forks source link

implemented assert! for resolving warning panic! #227

Closed HelloShiv closed 1 year ago

HelloShiv commented 1 year ago

Used assert! statement instead of alert, to indicate a failed condition without stopping the program immediately.

if e.kind() != ErrorKind::AlreadyExists {
    assert!(false, "Failed to create sym link: {:?}", e);
}
codecov[bot] commented 1 year ago

Codecov Report

Merging #227 (72a684d) into main (0e4517b) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 72a684d differs from pull request most recent head d7de766. Consider uploading reports for the commit d7de766 to get more accurate results

@@           Coverage Diff           @@
##             main     #227   +/-   ##
=======================================
  Coverage   58.61%   58.61%           
=======================================
  Files          30       30           
  Lines        3542     3542           
  Branches      785      785           
=======================================
  Hits         2076     2076           
  Misses       1170     1170           
  Partials      296      296           
Impacted Files Coverage Δ
src/find/matchers/lname.rs 76.19% <ø> (ø)
src/find/matchers/name.rs 100.00% <ø> (ø)
src/find/matchers/printf.rs 70.62% <ø> (ø)
src/find/matchers/type_matcher.rs 88.23% <ø> (ø)
src/find/mod.rs 66.33% <ø> (ø)
tests/find_cmd_tests.rs 90.29% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

sylvestre commented 1 year ago

you should follow the recommendation:

   | |_____________^ help: try instead: `assert!(!(e.kind() != ErrorKind::AlreadyExists), "Failed to create sym link: {:?}", e);