Closed Maximkaaa closed 3 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
crates/env_filter/src/filter.rs | 5 | 12 | 41.67% | ||
crates/env_filter/src/parser.rs | 7 | 28 | 25.0% | ||
<!-- | Total: | 12 | 40 | 30.0% | --> |
Totals | |
---|---|
Change from base Build 9504345986: | -1.0% |
Covered Lines: | 245 |
Relevant Lines: | 576 |
Thanks for moving this forward!
I fixed all the comments except the last one, since I think that the current approach is better. If you insist on returning just one error string, I will edit it also.
Looks like the final commit needs cargo fmt
run on it
Looks like the final commit needs
cargo fmt
run on it
Done.
Thanks! This is now released.
Current implementation of the
Builder::parse()
method prints out specification errors tostderr
and then just ignores them. This is fine for most console applications, but in some cases better control over what is happening is needed:stderr
, in that case there is no way to find out what went wrongFor such cases this PR introduces a new method
try_parse
that does the same thing as theparse
method, but returns anErr
in case an error in the specification is found.This change was suggested in and fixes #323.