Skip to content

chore: fix clippy::cast_lossless #7728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

nyurik
Copy link
Contributor

@nyurik nyurik commented Apr 11, 2025

Used this command:

cargo clippy --fix --workspace --all-targets -- -A clippy::all -W clippy::cast_lossless
cargo fmt --all

@nyurik nyurik force-pushed the cast_lossless branch 2 times, most recently from 638dfa2 to d8a8858 Compare April 11, 2025 19:16
Copy link

GNU testsuite comparison:

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

@nyurik nyurik force-pushed the cast_lossless branch 3 times, most recently from 42015d8 to 4306cae Compare April 13, 2025 04:53
Copy link

GNU testsuite comparison:

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

@sylvestre
Copy link
Contributor

fails with:

error[E0277]: the trait bound `u32: From<i32>` is not satisfied
    --> src/uu/ls/src/ls.rs:3134:18
     |
3134 |     (md.mode() & u32::from(S_IXUSR | S_IXGRP | S_IXOTH)) != 0
     |                  ^^^ the trait `From<i32>` is not implemented for `u32`
     |

Copy link

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

GNU testsuite comparison:

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

Copy link

GNU testsuite comparison:

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

Used this command:

```shell
cargo clippy --fix --workspace --all-targets -- -A clippy::all -W clippy::cast_lossless
cargo fmt --all
```
Copy link

GNU testsuite comparison:

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

@nyurik nyurik marked this pull request as draft April 15, 2025 17:23
@nyurik
Copy link
Contributor Author

nyurik commented Apr 15, 2025

mode_t is a major pain, I may need to revisit it at libc level

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