Fix build on Redox, and add stat to Redox feature#5502
Conversation
398ca50 to
03ed9d9
Compare
src/uu/cp/src/cp.rs
Outdated
| Ok(()) | ||
| } | ||
|
|
||
| #[allow(clippy::unnecessary_cast)] |
There was a problem hiding this comment.
do you know many occurrences of this happen in this function? If not too many, could you please move that into the function itself
There was a problem hiding this comment.
Actually, looking at the function again, I see there's already a seperate case with an as u32 for FreeBSD / macOS / Android which are using u16. So Redox could be moved to that case. Though just using a cast with this #[allow] is simpler.
I wonder if it would be better to just not use these constants, and just use octal notation here? Their values should be standardized, and I think people may be more familiar with the octal values for Unix-style permissions than with the constant names.
src/uucore/src/lib/features/mode.rs
Outdated
|
|
||
| let result = if mode.chars().any(|c| c.is_ascii_digit()) { | ||
| parse_numeric(fperm, mode, true) | ||
| parse_numeric(fperm as _, mode, true) |
There was a problem hiding this comment.
please add a comment explaining the "as _"
| (srwx, pos) | ||
| } | ||
|
|
||
| #[allow(clippy::unnecessary_cast)] |
|
LGTM |
|
I can work on CI soon. Sorry I haven't gotten to it yet. |
|
no need to be sorry :) |
|
WIP: #5642 |
No description provided.