Improve currying.

This commit is contained in:
Stephen Chung
2020-07-23 10:12:51 +08:00
parent 6d551f1596
commit b913b521dc
4 changed files with 24 additions and 24 deletions

View File

@@ -735,7 +735,7 @@ impl Dynamic {
pub(crate) fn take_immutable_string(self) -> Result<ImmutableString, &'static str> {
match self.0 {
Union::Str(s) => Ok(s),
Union::FnPtr(f) => Ok(f.take_fn_name()),
Union::FnPtr(f) => Ok(f.take_data().0),
_ => Err(self.type_name()),
}
}