trampoline_from_glib: Fix non-Borrowed GString
We can't call `as_str` on `Option<GString>`.
Pre-#1327, we used `as_deref` to make use of `GString`'s
deref-to-`&str`.
@@ -43,7 +43,7 @@ impl TrampolineFromGlib for Transformation {
right = format!("{}.as_ref().as_ref()", right);
}
} else if is_gstring(&type_name) {
- right = format!("{}.as_str()", right);
+ right = format!("{}.as_ref().map(|s| s.as_str())", right);
} else {
right = format!("{}.as_ref()", right);
}
