Conversation
500a487 to
c711166
Compare
|
Changes since initial push:
|
c711166 to
b2e8f73
Compare
|
Changes since last push: |
b2e8f73 to
acb3f57
Compare
|
Changes since last push:
|
acb3f57 to
cf04aea
Compare
|
Changes since last push:
|
cf04aea to
e2cdf41
Compare
tertsdiepraam
left a comment
There was a problem hiding this comment.
Awesome! My only real issue is with the Value thing I commented on. Once that's resolved: LGTM!
tests/coreutils/date.rs
Outdated
| enum Iso8601Format { | ||
| #[default] | ||
| #[value("date")] | ||
| // TODO: Express the concept "accepts prefixes" more nicely. |
There was a problem hiding this comment.
I thought I built this into Value already? It's working here for example:
uutils-args/tests/coreutils/ls.rs
Line 480 in a3ecc62
There was a problem hiding this comment.
You're right! Fixed
|
|
||
| impl Options<Arg> for Settings { | ||
| fn apply(&mut self, arg: Arg) -> Result<(), uutils_args::Error> { | ||
| if self.chosen_format != Format::Unspecified { |
There was a problem hiding this comment.
So, I take a bit of issue with this example, because I don't like how Unspecified is a special thing that only exists for parsing. Essentially, it comes down to this: #11.
BUT! I don't care enough to block this. We can improve this later and we should move towards shipping this crate.
e2cdf41 to
66e1992
Compare
|
Changes since last push:
The clippy failure will be fixed by #125. Sorry, didn't see that it's my turn! |
Also, exhausting tests.
This causes CI failures, so let's fix this.
66e1992 to
e3f0b52
Compare
This PR shows one way we could make
Options::applyfallible.This feature trivially enables error prioritization, e.g. raising different errors for
--a=invalid --b=invalidand--b=invalid --a=invalid, which is what the GNU tools do.Closes #112