Skip to content

Commit

Permalink
Don't cast callbacks as &Box<T> but use &T instead to make clippy…
Browse files Browse the repository at this point in the history
… happy
  • Loading branch information
sdroege committed Nov 15, 2024
1 parent 044dd2c commit 6778124
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/codegen/function_body_chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,15 @@ impl Builder {
))),
type_: Some(Box::new(Chunk::Custom(
if !trampoline.scope.is_async() && !trampoline.scope.is_call() {
format!("&{}", full_type.1)
format!(
"&{}",
full_type
.1
.strip_prefix("Box_<")
.unwrap()
.strip_suffix(">")
.unwrap()
)
} else {
full_type.1.clone()
},
Expand Down

0 comments on commit 6778124

Please sign in to comment.