Skip to content

Commit f90de79

Browse files
committed
fix skipping rustfmt
1 parent cbe075d commit f90de79

2 files changed

Lines changed: 37 additions & 16 deletions

File tree

crates/fspy_detours_sys/src/generated_bindings.rs

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
use winapi::{
2-
shared::{guiddef::*, minwindef::*, windef::*},
3-
um::{
4-
minwinbase::*,
5-
processthreadsapi::*,
6-
winnt::{INT, *},
7-
},
8-
};
1+
#![rustfmt::skip]
2+
use winapi::shared::minwindef::*;
3+
use winapi::um::winnt::*;
4+
use winapi::um::winnt::INT;
5+
use winapi::um::minwinbase::*;
6+
use winapi::um::processthreadsapi::*;
7+
use winapi::shared::guiddef::*;
8+
use winapi::shared::windef::*;
99

1010
#[repr(C)]
1111
#[derive(Debug, Copy, Clone)]
@@ -15,7 +15,11 @@ pub struct _DETOUR_TRAMPOLINE {
1515
pub type PDETOUR_TRAMPOLINE = *mut _DETOUR_TRAMPOLINE;
1616
/// Binary Typedefs.
1717
pub type PF_DETOUR_BINARY_BYWAY_CALLBACK = ::std::option::Option<
18-
unsafe extern "system" fn(pContext: PVOID, pszFile: LPCSTR, ppszOutFile: *mut LPCSTR) -> BOOL,
18+
unsafe extern "system" fn(
19+
pContext: PVOID,
20+
pszFile: LPCSTR,
21+
ppszOutFile: *mut LPCSTR,
22+
) -> BOOL,
1923
>;
2024
pub type PF_DETOUR_BINARY_FILE_CALLBACK = ::std::option::Option<
2125
unsafe extern "system" fn(
@@ -36,8 +40,9 @@ pub type PF_DETOUR_BINARY_SYMBOL_CALLBACK = ::std::option::Option<
3640
ppszOutSymbol: *mut LPCSTR,
3741
) -> BOOL,
3842
>;
39-
pub type PF_DETOUR_BINARY_COMMIT_CALLBACK =
40-
::std::option::Option<unsafe extern "system" fn(pContext: PVOID) -> BOOL>;
43+
pub type PF_DETOUR_BINARY_COMMIT_CALLBACK = ::std::option::Option<
44+
unsafe extern "system" fn(pContext: PVOID) -> BOOL,
45+
>;
4146
pub type PF_DETOUR_ENUMERATE_EXPORT_CALLBACK = ::std::option::Option<
4247
unsafe extern "system" fn(
4348
pContext: PVOID,
@@ -174,7 +179,11 @@ unsafe extern "system" {
174179
) -> BOOL;
175180
}
176181
unsafe extern "system" {
177-
pub fn DetourFindPayload(hModule: HMODULE, rguid: *const GUID, pcbData: *mut DWORD) -> PVOID;
182+
pub fn DetourFindPayload(
183+
hModule: HMODULE,
184+
rguid: *const GUID,
185+
pcbData: *mut DWORD,
186+
) -> PVOID;
178187
}
179188
unsafe extern "system" {
180189
pub fn DetourFindPayloadEx(rguid: *const GUID, pcbData: *mut DWORD) -> PVOID;
@@ -213,7 +222,10 @@ unsafe extern "system" {
213222
) -> PVOID;
214223
}
215224
unsafe extern "system" {
216-
pub fn DetourBinaryDeletePayload(pBinary: PDETOUR_BINARY, rguid: *const GUID) -> BOOL;
225+
pub fn DetourBinaryDeletePayload(
226+
pBinary: PDETOUR_BINARY,
227+
rguid: *const GUID,
228+
) -> BOOL;
217229
}
218230
unsafe extern "system" {
219231
pub fn DetourBinaryPurgePayloads(pBinary: PDETOUR_BINARY) -> BOOL;
@@ -402,8 +414,11 @@ unsafe extern "system" {
402414
) -> BOOL;
403415
}
404416
unsafe extern "system" {
405-
pub fn DetourUpdateProcessWithDll(hProcess: HANDLE, rlpDlls: *mut LPCSTR, nDlls: DWORD)
406-
-> BOOL;
417+
pub fn DetourUpdateProcessWithDll(
418+
hProcess: HANDLE,
419+
rlpDlls: *mut LPCSTR,
420+
nDlls: DWORD,
421+
) -> BOOL;
407422
}
408423
unsafe extern "system" {
409424
pub fn DetourUpdateProcessWithDllEx(
@@ -440,5 +455,10 @@ unsafe extern "system" {
440455
pub fn DetourIsHelperProcess() -> BOOL;
441456
}
442457
unsafe extern "system" {
443-
pub fn DetourFinishHelperProcess(arg1: HWND, arg2: HINSTANCE, arg3: LPSTR, arg4: INT);
458+
pub fn DetourFinishHelperProcess(
459+
arg1: HWND,
460+
arg2: HINSTANCE,
461+
arg3: LPSTR,
462+
arg4: INT,
463+
);
444464
}

crates/fspy_detours_sys/tests/bindings.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ fn detours_bindings() {
3333
.blocklist_type("_STARTUPINFOA")
3434
.blocklist_type("_STARTUPINFOW")
3535
.disable_header_comment()
36+
.raw_line("#![rustfmt::skip]") // generated code is formatted by prettyplease, not rustfmt
3637
.raw_line("use winapi::shared::minwindef::*;")
3738
.raw_line("use winapi::um::winnt::*;")
3839
.raw_line("use winapi::um::winnt::INT;")

0 commit comments

Comments
 (0)