use GString in glib context

This commit is contained in:
yggverse 2024-10-12 09:04:04 +03:00
parent adcf05f43a
commit 9cf434fdab

View File

@ -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()),
}) })
} }