From 3a98567139185f27d80d32b7e2c92907f81c4664 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sun, 20 Sep 2020 14:29:10 +0800 Subject: [PATCH] Use take_string. --- codegen/src/function.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/codegen/src/function.rs b/codegen/src/function.rs index 2c0cf525..2fca6d96 100644 --- a/codegen/src/function.rs +++ b/codegen/src/function.rs @@ -666,8 +666,7 @@ impl ExportedFn { is_string = true; is_ref = false; quote_spanned!(arg_type.span()=> - mem::take(args[#i]) - .clone().cast::<#arg_type>()) + mem::take(args[#i]).take_string().unwrap()) } _ => { is_string = false;