Skip to content

Commit

Permalink
style: 💄 Format Rust code
Browse files Browse the repository at this point in the history
  • Loading branch information
AntwortEinesLebens committed Feb 7, 2025
1 parent 884083e commit 0bdf03d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/commands/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

use crate::{
commands::{
traces::{Traces, Traversable},
Runnable,
traces::{Traces, Traversable},
},
displayer::Displayer,
};
use clap::Parser;
use console::{style, Emoji};
use console::{Emoji, style};
use serde::Deserialize;
use std::{
fmt::{Display, Formatter, Result as FormatResult},
Expand Down
2 changes: 1 addition & 1 deletion src/commands/traces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: GPL-3.0-or-later

use crate::commands::{
traces::{drivers::Drivers, processes::Processes},
Runnable,
traces::{drivers::Drivers, processes::Processes},
};
use clap::{Args, Subcommand};
use serde::Deserialize;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/traces/drivers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

use crate::commands::traces::{drivers::byovd::Byovd, Trace, Traversable};
use crate::commands::traces::{Trace, Traversable, drivers::byovd::Byovd};
use clap::{Args, Subcommand};
use serde::Deserialize;

Expand Down
8 changes: 4 additions & 4 deletions src/commands/traces/drivers/byovd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
// SPDX-License-Identifier: GPL-3.0-or-later

use crate::{
commands::{traces::Trace, Runnable},
commands::{Runnable, traces::Trace},
displayer::Displayer,
};
use clap::Parser;
use serde::Deserialize;
use std::{path::PathBuf, process::ExitCode};
use windows::{
core::{Owned, HSTRING, PCWSTR},
Win32::System::Services::{
CreateServiceW, OpenSCManagerW, StartServiceW, SC_MANAGER_ALL_ACCESS,
SC_MANAGER_CREATE_SERVICE, SERVICE_AUTO_START, SERVICE_ERROR_IGNORE, SERVICE_KERNEL_DRIVER,
CreateServiceW, OpenSCManagerW, SC_MANAGER_ALL_ACCESS, SC_MANAGER_CREATE_SERVICE,
SERVICE_AUTO_START, SERVICE_ERROR_IGNORE, SERVICE_KERNEL_DRIVER, StartServiceW,
},
core::{HSTRING, Owned, PCWSTR},
};

#[derive(Parser, Deserialize)]
Expand Down
2 changes: 1 addition & 1 deletion src/commands/traces/processes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

use crate::commands::traces::{processes::spoofing::Spoofing, Trace, Traversable};
use crate::commands::traces::{Trace, Traversable, processes::spoofing::Spoofing};
use clap::{Args, Subcommand};
use serde::Deserialize;

Expand Down
12 changes: 6 additions & 6 deletions src/commands/traces/processes/spoofing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later

use crate::{
commands::{traces::Trace, Runnable},
commands::{Runnable, traces::Trace},
displayer::Displayer,
windows::processes::get_process_identifier,
};
Expand All @@ -14,16 +14,16 @@ use std::{
process::ExitCode,
};
use windows::{
core::{Owned, PWSTR},
Win32::{
Foundation::HANDLE,
System::Threading::{
CreateProcessW, InitializeProcThreadAttributeList, OpenProcess,
UpdateProcThreadAttribute, EXTENDED_STARTUPINFO_PRESENT, LPPROC_THREAD_ATTRIBUTE_LIST,
PROCESS_CREATE_PROCESS, PROCESS_INFORMATION, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS,
STARTUPINFOEXW, STARTUPINFOW,
CreateProcessW, EXTENDED_STARTUPINFO_PRESENT, InitializeProcThreadAttributeList,
LPPROC_THREAD_ATTRIBUTE_LIST, OpenProcess, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS,
PROCESS_CREATE_PROCESS, PROCESS_INFORMATION, STARTUPINFOEXW, STARTUPINFOW,
UpdateProcThreadAttribute,
},
},
core::{Owned, PWSTR},
};

#[derive(Parser, Deserialize)]
Expand Down
4 changes: 2 additions & 2 deletions src/windows/processes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

use std::mem::size_of;
use windows::{
core::{Error, Owned, Result, HSTRING},
Win32::{
Foundation::E_INVALIDARG,
System::Diagnostics::ToolHelp::{
CreateToolhelp32Snapshot, Process32FirstW, Process32NextW, PROCESSENTRY32W,
CreateToolhelp32Snapshot, PROCESSENTRY32W, Process32FirstW, Process32NextW,
TH32CS_SNAPPROCESS,
},
},
core::{Error, HSTRING, Owned, Result},
};

pub fn get_process_identifier(name: &str) -> Result<u32> {
Expand Down

0 comments on commit 0bdf03d

Please sign in to comment.