From 1a644ee219269d1836467c15bd04b1b34b600008 Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 25 Sep 2024 20:54:34 +0300 Subject: [PATCH] use arc pointer --- src/browser/main/tab/page/content/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/browser/main/tab/page/content/mod.rs b/src/browser/main/tab/page/content/mod.rs index 33f818c7..ea369dd6 100644 --- a/src/browser/main/tab/page/content/mod.rs +++ b/src/browser/main/tab/page/content/mod.rs @@ -1,3 +1,5 @@ +use std::sync::Arc; + use gtk::{Box, Orientation}; pub struct Content { @@ -6,10 +8,10 @@ pub struct Content { impl Content { // Construct - pub fn new() -> Content { - Self { + pub fn new() -> Arc { + Arc::new(Self { widget: Box::builder().orientation(Orientation::Vertical).build(), - } + }) } // Getters