Solve `unused imports` warning

This commit is contained in:
Albert24GG 2024-03-06 10:34:47 +02:00
parent c19eaf1756
commit 6a1600d432
2 changed files with 11 additions and 8 deletions

View File

@ -1,13 +1,13 @@
use anyhow::Result; use anyhow::Result;
use goblin::pe::export::Export; #[cfg(target_os = "windows")]
use goblin::pe::import::Import; use goblin::pe::{
use goblin::pe::options::ParseOptions; export::Export, import::Import, options::ParseOptions, section_table::SectionTable, PE,
use goblin::pe::section_table::SectionTable; };
use goblin::pe::PE;
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
use goblin::elf::{program_header, sym, Elf, SectionHeader}; use goblin::elf::{sym, Elf, SectionHeader};
#[cfg(target_os = "linux")]
use std::path::PathBuf; use std::path::PathBuf;
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]

View File

@ -5,10 +5,13 @@ use super::ModuleEntry;
use anyhow::{bail, Result}; use anyhow::{bail, Result};
use std::collections::HashMap; use std::collections::HashMap;
use std::ffi::{c_void, CStr}; use std::ffi::c_void;
use std::mem; use std::mem;
use std::ptr;
#[cfg(target_os = "windows")]
use std::ffi::CStr;
#[cfg(target_os = "windows")]
use std::ptr;
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
use windows::Win32::{ use windows::Win32::{
Foundation::{CloseHandle, HANDLE}, Foundation::{CloseHandle, HANDLE},