From 6f4bc64689be3159aa954c4ed6045a690117a85f Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 17 Jan 2025 04:22:21 +0200 Subject: [PATCH] add comment wrap client object in `Rc` --- src/app/browser/window/tab/item/page/client/driver.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/browser/window/tab/item/page/client/driver.rs b/src/app/browser/window/tab/item/page/client/driver.rs index 75e032ed..05b068f8 100644 --- a/src/app/browser/window/tab/item/page/client/driver.rs +++ b/src/app/browser/window/tab/item/page/client/driver.rs @@ -24,7 +24,9 @@ pub struct Driver { /// Redirect resolver for different protocols redirect: Rc, /// Supported clients - gemini: ggemini::Client, + /// * gemini driver should be initiated once (on page object init) + /// to process all it connection features properly + gemini: Rc, // other clients here.. } @@ -34,7 +36,7 @@ impl Driver { /// Init new `Self` pub fn init(profile: &Rc, callback: impl Fn(Status) + 'static) -> Self { // Init supported protocol libraries - let gemini = ggemini::Client::new(); + let gemini = Rc::new(ggemini::Client::new()); // Translate driver status to `Status`