Skip to content

Conversation

lewisboon
Copy link
Contributor

Closes #7536

I'm not particularly happy with the solution for FilesystemTypeBothSelectedAndExcluded, but it does pass the tests.
I'd be happy to receive any feedback to improve it.

Thanks!

Copy link

github-actions bot commented Apr 5, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)

ColumnError(ColumnError),

#[error("{}", .0.iter().map(|t| format!("file system type {} both selected and excluded", t.quote())).collect::<Vec<String>>().join(format!("\n{}: ", uucore::util_name()).as_str()))]
Copy link

@sol-ontiver sol-ontiver Apr 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Formatting could help readability - e.g:

#[error("{}", .0.iter()
        .map(|t| format!("file system type {} both selected and excluded", t.quote()))
        .collect::<Vec<String>>()
        .join(format!("\n{}: ", uucore::util_name()).as_str()))]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A detail: you can omit the String type and replace it with _.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Good ideas. I've updated the branch to incorporate both. Appreciate the feedback.

impl fmt::Display for OptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
// TODO This needs to vary based on whether `--block-size`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we want to keep the various TODO here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes definitely. I took a look implementing the TODO but it certainly is harder than it seems. I get now why its a TODO. I'll take a look at that separately.

I've put the TODO comments back in. Thanks.

Copy link

github-actions bot commented Apr 6, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)

Copy link

github-actions bot commented Apr 9, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre merged commit bf9a8b8 into uutils:main Apr 10, 2025
68 of 69 checks passed
@sylvestre
Copy link
Contributor

thanks

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.

df/OptionsError: move to use thiserror
4 participants