fix(windows): update imports in database_storage and local backend for clarity

- Added GENERIC_READ import directly in both database_storage.rs and local.rs to enhance clarity in Windows API usage.
- Ensured consistency in handling Windows-specific functionality across the codebase.
This commit is contained in:
Jamie Pine
2025-12-30 17:30:28 -08:00
parent 577133a4ed
commit cc252c0fbc
2 changed files with 4 additions and 4 deletions

View File

@@ -150,11 +150,11 @@ impl DatabaseStorage {
#[cfg(windows)]
pub fn get_inode(path: &Path, _metadata: &std::fs::Metadata) -> Option<u64> {
use std::os::windows::ffi::OsStrExt;
use windows_sys::Win32::Foundation::{CloseHandle, INVALID_HANDLE_VALUE};
use windows_sys::Win32::Foundation::{CloseHandle, GENERIC_READ, INVALID_HANDLE_VALUE};
use windows_sys::Win32::Storage::FileSystem::{
CreateFileW, GetFileInformationByHandle, BY_HANDLE_FILE_INFORMATION,
FILE_FLAG_BACKUP_SEMANTICS, FILE_SHARE_DELETE, FILE_SHARE_READ, FILE_SHARE_WRITE,
GENERIC_READ, OPEN_EXISTING,
OPEN_EXISTING,
};
// Convert path to wide string for Windows API

View File

@@ -51,11 +51,11 @@ impl LocalBackend {
#[cfg(windows)]
fn get_inode(path: &Path, _metadata: &std::fs::Metadata) -> Option<u64> {
use std::os::windows::ffi::OsStrExt;
use windows_sys::Win32::Foundation::{CloseHandle, INVALID_HANDLE_VALUE};
use windows_sys::Win32::Foundation::{CloseHandle, GENERIC_READ, INVALID_HANDLE_VALUE};
use windows_sys::Win32::Storage::FileSystem::{
CreateFileW, GetFileInformationByHandle, BY_HANDLE_FILE_INFORMATION,
FILE_FLAG_BACKUP_SEMANTICS, FILE_SHARE_DELETE, FILE_SHARE_READ, FILE_SHARE_WRITE,
GENERIC_READ, OPEN_EXISTING,
OPEN_EXISTING,
};
// Convert path to wide string for Windows API