replace GString with String

This commit is contained in:
yggverse 2024-12-02 20:21:19 +02:00
parent 737117b91f
commit dbe080a4f1

View file

@ -1,7 +1,7 @@
use glib::{DateTime, GString, Regex, RegexCompileFlags, RegexMatchFlags, TimeZone, Uri, UriFlags}; use glib::{DateTime, Regex, RegexCompileFlags, RegexMatchFlags, TimeZone, Uri, UriFlags};
pub struct Link { pub struct Link {
pub alt: Option<GString>, // [optional] alternative link description pub alt: Option<String>, // [optional] alternative link description
pub is_external: Option<bool>, // [optional] external link indication, on base option provided pub is_external: Option<bool>, // [optional] external link indication, on base option provided
pub timestamp: Option<DateTime>, // [optional] valid link DateTime object pub timestamp: Option<DateTime>, // [optional] valid link DateTime object
pub uri: Uri, // [required] valid link URI object pub uri: Uri, // [required] valid link URI object
@ -86,7 +86,7 @@ impl Link {
// Alt // Alt
if let Some(value) = regex.get(3) { if let Some(value) = regex.get(3) {
if !value.is_empty() { if !value.is_empty() {
alt = Some(GString::from(value.as_str())) alt = Some(value.to_string())
} }
}; };