Change take_string and take_immutable_string to as_XXX.
This commit is contained in:
@@ -28,7 +28,7 @@ pub fn print_with_func(
|
||||
) -> crate::ImmutableString {
|
||||
match ctx.call_fn_dynamic_raw(fn_name, true, &mut [value]) {
|
||||
Ok(result) if result.is::<crate::ImmutableString>() => result
|
||||
.take_immutable_string()
|
||||
.as_immutable_string()
|
||||
.expect("never fails as the result is `ImmutableString`"),
|
||||
Ok(result) => ctx.engine().map_type_name(result.type_name()).into(),
|
||||
Err(_) => ctx.engine().map_type_name(value.type_name()).into(),
|
||||
|
Reference in New Issue
Block a user