feat: 优化和增加TODO

This commit is contained in:
2024-12-11 11:25:00 +08:00
parent 45148ead6e
commit 90e3e22e44
5 changed files with 78 additions and 14 deletions

View File

@@ -26,7 +26,6 @@ pub fn set_complete(app: AppHandle) -> Result<(), AppError> {
Ok(())
}
// TODO: 获取PE节点树的JSON数据
#[tauri::command]
pub fn command_get_file_pe_node_tree_data() -> Result<Vec<PeNodeTreeData>, AppError> {
// 1. 如果没有打开文件,则返回错误
@@ -91,7 +90,6 @@ pub fn command_open_file(file_path: &str) -> Result<(), AppError> {
}
// 判断文件是否是64位
// TODO: GLOBAL_IS_64_BIT
let binding = GLOBAL_FILE_DATA.lock().unwrap();
let file_data = binding.as_ref().unwrap();
let is64bit = file_data.is_64_bit()?;

View File

@@ -5,7 +5,6 @@ use crate::{app_error::AppError, pe_parse::{header::{ImageDosHeader, ImageFileHe
use super::{GLOBAL_FILE_DATA, GLOBAL_IS_64_BIT};
// TODO: 打开文件,并将文件映射到内存
pub fn mmap_mut_file(file_path: &str) -> Result<Mmap, std::io::Error> {
let file = std::fs::OpenOptions::new().read(true).open(file_path)?;