Skip to content

Commit

Permalink
Move test::loc's use statements up
Browse files Browse the repository at this point in the history
Since they have the same effect even down where that is not
intuitive.
  • Loading branch information
EliahKagan committed Jul 15, 2024
1 parent dea1746 commit dd53408
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions gix-path/src/env/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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| {
Expand Down Expand Up @@ -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<Self>;
}
Expand Down

0 comments on commit dd53408

Please sign in to comment.