Merge pull request #567 from schungx/master

Fix no_object build.
This commit is contained in:
Stephen Chung 2022-05-24 08:03:19 +08:00 committed by GitHub
commit 2d46fd9587
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);