From 556cd729efb6834b1f9830e13eebf0feb70b9185 Mon Sep 17 00:00:00 2001 From: AntwortEinesLebens Date: Wed, 28 Aug 2024 22:04:36 +0200 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=94=A8=20Fix=20linting=20erro?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/actions/processes/spoofing.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/actions/processes/spoofing.rs b/src/actions/processes/spoofing.rs index ecad2e7..fab6f85 100644 --- a/src/actions/processes/spoofing.rs +++ b/src/actions/processes/spoofing.rs @@ -70,8 +70,10 @@ impl Display for ProcessNotFound { fn get_pid_from_name(name: &str) -> Result> { let snapshot: Owned = unsafe { Owned::new(CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)?) }; - let mut process_entry: PROCESSENTRY32W = PROCESSENTRY32W::default(); - process_entry.dwSize = size_of::() as u32; + let mut process_entry: PROCESSENTRY32W = PROCESSENTRY32W { + dwSize: size_of::() as u32, + ..Default::default() + }; unsafe { Process32FirstW(*snapshot, &mut process_entry)?;