-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: lint libc-test/build.rs
#4412
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
Conversation
51658d2
to
4accf8f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
20de9a7
to
e679015
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most changes here look fine to me, but I think replacing match
within cfg
closures should be dropped (e.g. volatile_items
and skip_*
) since it breaks consistency with the rest. Those lints can be ignored for the whole file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last nit then LGTM, please squash
libc-test/build.rs
Outdated
cfg.skip_type(move |ty| match ty { | ||
"stat64" | "sighandler_t" | "off64_t" => true, | ||
_ => false, | ||
}); | ||
cfg.skip_type(|ty| matches!(ty, "stat64" | "sighandler_t" | "off64_t")); | ||
|
||
cfg.skip_field_type(move |struct_, field| match (struct_, field) { | ||
("siginfo_t", "si_value") | ("stat", "st_size") | ("sigaction", "sa_u") => true, | ||
_ => false, | ||
cfg.skip_field_type(|struct_, field| { | ||
matches!( | ||
(struct_, field), | ||
("siginfo_t", "si_value") | ("stat", "st_size") | ("sigaction", "sa_u") | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you drop the changes to matches!
here? It's easier and less conflict-y to append new types/fields in the current form, plus consistency.
thx, fixed |
run `cargo clippy --all-targets` on `libc-test/build.rs`, and fix all default issues. ### Notes * `copy_dir_hotfix` had a `replace` parameter that was never used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
run
cargo clippy --all-targets
onlibc-test/build.rs
, and fix all default issues.Notes
copy_dir_hotfix
had areplace
parameter that was never used@rustbot label +stable-nominated