Change take_string and take_immutable_string to as_XXX.

This commit is contained in:
Stephen Chung
2021-06-10 10:45:44 +08:00
parent a5031969ca
commit 79d9977cd5
11 changed files with 62 additions and 31 deletions

View File

@@ -744,7 +744,7 @@ impl ExportedFn {
is_string = true;
is_ref = true;
quote_spanned!(arg_type.span() =>
mem::take(args[#i]).take_immutable_string().unwrap()
mem::take(args[#i]).as_immutable_string().unwrap()
)
}
_ => panic!("internal error: why wasn't this found earlier!?"),
@@ -753,7 +753,7 @@ impl ExportedFn {
is_string = true;
is_ref = false;
quote_spanned!(arg_type.span() =>
mem::take(args[#i]).take_string().unwrap()
mem::take(args[#i]).as_string().unwrap()
)
}
_ => {