Change take_string and take_immutable_string to as_XXX.
This commit is contained in:
@@ -542,7 +542,7 @@ impl SerializeMap for DynamicSerializer {
|
||||
#[cfg(not(feature = "no_object"))]
|
||||
{
|
||||
let key = std::mem::take(&mut self._key)
|
||||
.take_immutable_string()
|
||||
.as_immutable_string()
|
||||
.map_err(|typ| {
|
||||
EvalAltResult::ErrorMismatchDataType(
|
||||
"string".into(),
|
||||
@@ -572,7 +572,7 @@ impl SerializeMap for DynamicSerializer {
|
||||
#[cfg(not(feature = "no_object"))]
|
||||
{
|
||||
let _key: Dynamic = _key.serialize(&mut *self)?;
|
||||
let _key = _key.take_immutable_string().map_err(|typ| {
|
||||
let _key = _key.as_immutable_string().map_err(|typ| {
|
||||
EvalAltResult::ErrorMismatchDataType("string".into(), typ.into(), Position::NONE)
|
||||
})?;
|
||||
let _value = _value.serialize(&mut *self)?;
|
||||
|
Reference in New Issue
Block a user