From dd534087fd7829eee1a9b426ee8bcdaca9c352e1 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Mon, 15 Jul 2024 00:56:57 -0400 Subject: [PATCH] Move `test::loc`'s `use` statements up Since they have the same effect even down where that is not intuitive. --- gix-path/src/env/git.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gix-path/src/env/git.rs b/gix-path/src/env/git.rs index 2190aa0949a..5550b059e19 100644 --- a/gix-path/src/env/git.rs +++ b/gix-path/src/env/git.rs @@ -192,6 +192,17 @@ mod tests { #[cfg(windows)] mod loc { + use std::ffi::{OsStr, OsString}; + use std::io::ErrorKind; + use std::path::{Path, PathBuf}; + + use known_folders::{get_known_folder_path, KnownFolder}; + use windows::core::Result as WindowsResult; + use windows::Win32::Foundation::BOOL; + use windows::Win32::System::Threading::{GetCurrentProcess, IsWow64Process}; + use winreg::enums::{HKEY_LOCAL_MACHINE, KEY_QUERY_VALUE}; + use winreg::RegKey; + macro_rules! var_os_stub { { $($name:expr => $value:expr),* $(,)? } => { |key| { @@ -305,17 +316,6 @@ mod tests { ); } - use std::ffi::{OsStr, OsString}; - use std::io::ErrorKind; - use std::path::{Path, PathBuf}; - - use known_folders::{get_known_folder_path, KnownFolder}; - use windows::core::Result as WindowsResult; - use windows::Win32::Foundation::BOOL; - use windows::Win32::System::Threading::{GetCurrentProcess, IsWow64Process}; - use winreg::enums::{HKEY_LOCAL_MACHINE, KEY_QUERY_VALUE}; - use winreg::RegKey; - trait Current: Sized { fn current() -> WindowsResult; }