From daf276c006675973eecda5b72c464307deab7b8f Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 23 Sep 2024 13:58:56 +0300 Subject: [PATCH] return new mod object as arc pointer --- src/browser/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/browser/mod.rs b/src/browser/mod.rs index f1254f92..2cfd21a6 100644 --- a/src/browser/mod.rs +++ b/src/browser/mod.rs @@ -19,13 +19,13 @@ pub struct Browser { } impl Browser { - // Construct new browser + // Construct pub fn new( app: &Application, - connection: Arc, // @TODO glib clone macro? + connection: Arc, default_width: i32, default_height: i32, - ) -> Browser { + ) -> Arc { // Init components let db = db::Browser::new(connection); let header = header::Header::new(); @@ -62,12 +62,12 @@ impl Browser { ]); // Return - Self { + Arc::new(Self { db, widget, header, main, - } + }) } // Getters