Fix no_object build.

This commit is contained in:
Stephen Chung 2022-05-23 22:58:15 +08:00
parent 6120b7a01a
commit e4d492c727
2 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ Enhancements
* `EvalAltResult::IndexNotFound` is added to aid in raising errors for indexers. * `EvalAltResult::IndexNotFound` is added to aid in raising errors for indexers.
* `Engine::def_tag`, `Engine::def_tag_mut` and `Engine::set_tag` are added to manage a default value for the custom evaluation state, accessible via `EvalState::tag()` (which is the same as `NativeCallContext::tag()`). * `Engine::def_tag`, `Engine::def_tag_mut` and `Engine::set_tag` are added to manage a default value for the custom evaluation state, accessible via `EvalState::tag()` (which is the same as `NativeCallContext::tag()`).
* Originally, the debugger's custom state uses the same state as `EvalState::tag()` (which is the same as `NativeCallContext::tag()`). It is now split into its own variable accessible under `Debugger::state()`. * Originally, the debugger's custom state uses the same state as `EvalState::tag()` (which is the same as `NativeCallContext::tag()`). It is now split into its own variable accessible under `Debugger::state()`.
* Non-borrowed string keys can now be deserialized for object maps via `serde`.
Version 1.7.0 Version 1.7.0

View File

@ -817,6 +817,7 @@ fn test_serde_blob() -> Result<(), Box<EvalAltResult>> {
} }
#[test] #[test]
#[cfg(not(feature = "no_object"))]
fn test_serde_json_borrowed_string() { fn test_serde_json_borrowed_string() {
let value = json!({ "a": "b" }); let value = json!({ "a": "b" });
println!("value: {:?}", value); println!("value: {:?}", value);