Skip to content

matchers: Replace new_box() with an into_box() trait method#141

Merged
sylvestre merged 1 commit into
uutils:mainfrom
tavianator:into-box
Feb 8, 2022
Merged

matchers: Replace new_box() with an into_box() trait method#141
sylvestre merged 1 commit into
uutils:mainfrom
tavianator:into-box

Conversation

@tavianator

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Feb 1, 2022

Copy link
Copy Markdown

Codecov Report

Merging #141 (979a442) into main (a7af227) will increase coverage by 0.01%.
The diff coverage is 64.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #141      +/-   ##
==========================================
+ Coverage   52.86%   52.87%   +0.01%     
==========================================
  Files          24       24              
  Lines        4754     4709      -45     
  Branches     1550     1535      -15     
==========================================
- Hits         2513     2490      -23     
  Misses       1684     1684              
+ Partials      557      535      -22     
Impacted Files Coverage Δ
src/find/matchers/delete.rs 76.19% <ø> (-2.98%) ⬇️
src/find/matchers/empty.rs 30.43% <ø> (-8.03%) ⬇️
src/find/matchers/exec.rs 78.37% <ø> (+0.87%) ⬆️
src/find/matchers/name.rs 79.54% <ø> (+4.54%) ⬆️
src/find/matchers/perm.rs 67.88% <ø> (+0.03%) ⬆️
src/find/matchers/printer.rs 94.11% <ø> (-0.89%) ⬇️
src/find/matchers/printf.rs 67.71% <ø> (+0.01%) ⬆️
src/find/matchers/prune.rs 100.00% <ø> (ø)
src/find/matchers/regex.rs 48.78% <ø> (-1.22%) ⬇️
src/find/matchers/size.rs 75.60% <ø> (+0.60%) ⬆️
... and 7 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 a7af227...979a442. Read the comment docs.

@sylvestre

Copy link
Copy Markdown
Contributor

could you please explain in the commit message the why ?
thanks

This lets us get rid of the boilerplate new_box() inherent method on
most Matcher impls.  It also removes the need for explicit boxing before
passing Matchers to a few functions like new_and_matcher().
@sylvestre sylvestre merged commit 7ffd5f8 into uutils:main Feb 8, 2022
@tavianator tavianator deleted the into-box branch February 9, 2022 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants