Browse Source

use GString in glib context

master
yggverse 2 months ago
parent
commit
9cf434fdab
  1. 6
      src/app/browser/window/tab/item/page/content/text/gemini/reader/parser/header.rs

6
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 { pub enum Level {
H1, H1,
@ -7,7 +7,7 @@ pub enum Level {
} }
pub struct Header { pub struct Header {
value: String, value: GString,
level: Level, level: Level,
} }
@ -41,7 +41,7 @@ impl Header {
// Result // Result
Some(Header { Some(Header {
level, level,
value: String::from(value.as_str()), value: GString::from(value.as_str()),
}) })
} }

Loading…
Cancel
Save