From 2828d79fa23cbd246f1ba5236082e0596d1d170c Mon Sep 17 00:00:00 2001 From: seyon Date: Thu, 29 Jun 2023 13:11:41 +0100 Subject: [PATCH] use impl in new --- src/ops/custom.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ops/custom.rs b/src/ops/custom.rs index a458cd9cb0..ee06ae6241 100644 --- a/src/ops/custom.rs +++ b/src/ops/custom.rs @@ -25,10 +25,11 @@ pub struct OpaqueOp { impl OpaqueOp { /// Initialize a new named OpaqueOp - pub fn new(id: impl Into, custom: Box) -> Self { + pub fn new(id: impl Into, custom: impl CustomOp) -> Self { Self { id: id.into(), - custom, + + custom: Box::new(custom), } }