Skip to content

Commit

Permalink
Merge pull request gtk-rs#747 from EPashkin/nullable_scope_call
Browse files Browse the repository at this point in the history
Allow nullable trampolines with scope="call"
  • Loading branch information
EPashkin committed Apr 15, 2019
2 parents 16d8c2d + 9b6f48f commit 58cffd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codegen/function_body_chunk.rs
Expand Up @@ -480,7 +480,7 @@ impl Builder {
format!("::<{}>", bounds_names)
};
if !is_destroy {
if !trampoline.scope.is_call() && *trampoline.nullable {
if *trampoline.nullable {
chunks.push(Chunk::Custom(format!("let {0} = if {0}_data.is_some() {{ Some({0}_func{1} as _) }} else {{ None }};",
trampoline.name,
bounds_str)));
Expand Down

0 comments on commit 58cffd4

Please sign in to comment.