Skip to content

Commit 6778124

Browse files
committed
Don't cast callbacks as &Box<T> but use &T instead to make clippy happy
1 parent 044dd2c commit 6778124

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/codegen/function_body_chunk.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,15 @@ impl Builder {
484484
))),
485485
type_: Some(Box::new(Chunk::Custom(
486486
if !trampoline.scope.is_async() && !trampoline.scope.is_call() {
487-
format!("&{}", full_type.1)
487+
format!(
488+
"&{}",
489+
full_type
490+
.1
491+
.strip_prefix("Box_<")
492+
.unwrap()
493+
.strip_suffix(">")
494+
.unwrap()
495+
)
488496
} else {
489497
full_type.1.clone()
490498
},

0 commit comments

Comments
 (0)