trampoline_from_glib: Replace broken deref with as_ref
Use `as_ref` to reach into the `Borrowed<Option<GString>>`, producing
a `&Option<GString>`, which the next `as_ref` turns into
`Option<&GString>`.
Technically not needed, as with just one `as_ref` Rust can figure out it
means `Option::as_ref` and it auto-derefs the `Borrowed`.
Fixes:
@@ -38,7 +38,7 @@ impl TrampolineFromGlib for Transformation {
);
} else if nullable && is_borrow {
if is_gstring(&type_name) {
- right = format!("(*{}).as_ref().map(|s| s.as_str())", right);
+ right = format!("{}.as_ref().as_ref().map(|s| s.as_str())", right);
} else {
right = format!("{}.as_ref().as_ref()", right);
}
