Skip to content

Commit 0a7120a

Browse files
branchseerclaude
andcommitted
fix generated_bindings.rs formatting and platform-specific lint
- Add generated_bindings.rs to rustfmt ignore list to prevent imports_granularity from consolidating bindgen-generated imports - Use cfg_attr to conditionally apply derivable_impls expect only on non-Apple targets where the lint fires Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 416d024 commit 0a7120a

3 files changed

Lines changed: 18 additions & 11 deletions

File tree

.rustfmt.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,8 @@ reorder_impl_items = true
1616
group_imports = "StdExternalCrate"
1717
# Group "use" statements by crate
1818
imports_granularity = "Crate"
19+
20+
# Skip generated files
21+
ignore = [
22+
"crates/fspy_detours_sys/src/generated_bindings.rs",
23+
]

crates/fspy_detours_sys/src/generated_bindings.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
use winapi::{
2-
shared::{guiddef::*, minwindef::*, windef::*},
3-
um::{
4-
minwinbase::*,
5-
processthreadsapi::*,
6-
winnt::{INT, *},
7-
},
8-
};
1+
use winapi::shared::minwindef::*;
2+
use winapi::um::winnt::*;
3+
use winapi::um::winnt::INT;
4+
use winapi::um::minwinbase::*;
5+
use winapi::um::processthreadsapi::*;
6+
use winapi::shared::guiddef::*;
7+
use winapi::shared::windef::*;
98

109
#[repr(C)]
1110
#[derive(Debug, Copy, Clone)]

crates/fspy_shared_unix/src/exec/shebang.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ pub struct ParseShebangOptions {
1717
pub split_arguments: bool, // TODO: recursive
1818
}
1919

20-
#[expect(
21-
clippy::derivable_impls,
22-
reason = "on macOS split_arguments defaults to true via cfg!, which is not derivable"
20+
#[cfg_attr(
21+
not(target_vendor = "apple"),
22+
expect(
23+
clippy::derivable_impls,
24+
reason = "on macOS split_arguments defaults to true via cfg!, which is not derivable"
25+
)
2326
)]
2427
impl Default for ParseShebangOptions {
2528
fn default() -> Self {

0 commit comments

Comments
 (0)