diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index fe8f4f7..0b1aae3 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -57,7 +57,7 @@ fn save_bundle(bundle_dir: String, metadata_file_path: String, save_path: String file.read_to_end(&mut buffer).unwrap(); - zip_writer.write(&*buffer).unwrap(); + zip_writer.write_all(&*buffer).unwrap(); } zip_writer.finish().unwrap(); diff --git a/src-tauri/src/metadata/mod.rs b/src-tauri/src/metadata/mod.rs index b3d87e0..63203bd 100644 --- a/src-tauri/src/metadata/mod.rs +++ b/src-tauri/src/metadata/mod.rs @@ -1,10 +1,8 @@ -use std::{fs::File, io::{Write, Cursor}}; -use quick_xml::{se::Serializer, events::BytesStart}; +use std::{fs::File, io::{Write}}; +use quick_xml::{se::Serializer}; use serde::{Serialize, Deserialize}; use serde::ser::{SerializeSeq, SerializeStruct}; -use serde_xml_rs::{to_string, to_writer}; - #[derive(Debug, Deserialize, PartialEq, Clone)] pub(crate) struct Metadata { pub(crate) title: String, @@ -139,7 +137,7 @@ impl Metadata { ser.indent(' ', 4); self.serialize(ser).unwrap(); - file.write(buffer.as_bytes()).unwrap(); + file.write_all(buffer.as_bytes()).unwrap(); } }