From c07ebbac25fa1f791e05409870cd40d8431f8f6d Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Fri, 3 May 2024 18:20:28 +0100 Subject: [PATCH] Fix build --- crates/librqbit/src/session.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/librqbit/src/session.rs b/crates/librqbit/src/session.rs index 88dcc5e..9131214 100644 --- a/crates/librqbit/src/session.rs +++ b/crates/librqbit/src/session.rs @@ -279,7 +279,9 @@ fn merge_two_optional_streams( } /// Options for adding new torrents to the session. -#[derive(Default)] +// +// Serialize/deserialize is for Tauri. +#[derive(Default, Serialize, Deserialize)] pub struct AddTorrentOptions { /// Start in paused state. pub paused: bool, @@ -312,6 +314,7 @@ pub struct AddTorrentOptions { /// This is used to restore the session from serialized state. pub preferred_id: Option, + #[serde(skip)] pub storage_factory: Option, // If true, will write to disk in separate threads. The downside is additional allocations.