trim quote, replace GString with String

This commit is contained in:
yggverse 2024-12-03 17:57:25 +02:00
parent ec9b989d0a
commit c6f747fefd

View file

@ -1,7 +1,7 @@
use glib::{GString, Regex, RegexCompileFlags, RegexMatchFlags}; use glib::{Regex, RegexCompileFlags, RegexMatchFlags};
pub struct Quote { pub struct Quote {
pub value: GString, pub value: String,
} }
impl Quote { impl Quote {
@ -15,11 +15,11 @@ impl Quote {
); );
// Detect value // Detect value
let value = regex.get(1)?; let value = regex.get(1)?.trim();
// Result // Result
Some(Self { Some(Self {
value: GString::from(value.as_str()), value: String::from(value),
}) })
} }
} }