Skip to content

Commit

Permalink
Merge pull request #1335 from heftig/unbreak-gst
Browse files Browse the repository at this point in the history
trampoline_from_glib: Replace broken deref with as_ref
  • Loading branch information
sdroege authored Mar 30, 2022
2 parents f2ff174 + 47583d3 commit 9aa16ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/codegen/trampoline_from_glib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ 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);
}
} 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);
}
Expand Down

0 comments on commit 9aa16ea

Please sign in to comment.