From 9cf434fdab969b3d18a2854e1b2beb5d6268e52a Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 12 Oct 2024 09:04:04 +0300 Subject: [PATCH] use GString in glib context --- .../item/page/content/text/gemini/reader/parser/header.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/browser/window/tab/item/page/content/text/gemini/reader/parser/header.rs b/src/app/browser/window/tab/item/page/content/text/gemini/reader/parser/header.rs index edaf8898..5e7ce2d0 100644 --- a/src/app/browser/window/tab/item/page/content/text/gemini/reader/parser/header.rs +++ b/src/app/browser/window/tab/item/page/content/text/gemini/reader/parser/header.rs @@ -1,4 +1,4 @@ -use gtk::glib::{Regex, RegexCompileFlags, RegexMatchFlags}; +use gtk::glib::{GString, Regex, RegexCompileFlags, RegexMatchFlags}; pub enum Level { H1, @@ -7,7 +7,7 @@ pub enum Level { } pub struct Header { - value: String, + value: GString, level: Level, } @@ -41,7 +41,7 @@ impl Header { // Result Some(Header { level, - value: String::from(value.as_str()), + value: GString::from(value.as_str()), }) }