mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-15 00:24:45 +01:00
remove unused fs
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
use std::fs;
|
use std::fs;
|
||||||
use file_diff::diff;
|
use file_diff::diff;
|
||||||
use std::{fs, io::{Read, Write}};
|
use std::{io::{Read, Write}};
|
||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub fn rename(path: String, new_name: String) {
|
pub fn rename(path: String, new_name: String) {
|
||||||
@@ -99,6 +99,7 @@ pub fn delete_file(path: String) -> bool {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tauri::command]
|
||||||
pub fn read_file(path: String) -> String {
|
pub fn read_file(path: String) -> String {
|
||||||
let mut file = match fs::File::open(path) {
|
let mut file = match fs::File::open(path) {
|
||||||
Ok(file) => file,
|
Ok(file) => file,
|
||||||
|
|||||||
Reference in New Issue
Block a user