diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ea21d8c..87f55f4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ Enhancements * `SmartString` now uses `LazyCompact` instead of `Compact` to minimize allocations. * Added `pop` for strings. * Added `ImmutableString::ptr_eq` to test if two strings point to the same allocation. +* The `serde` feature of `SmartString` is turned on under `metadata` to make `Map` serializable. ### `Scope` API diff --git a/Cargo.toml b/Cargo.toml index ef48ed62..52e61ab6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ no_closure = [] # no automatic sharing and capture of anonymous no_module = [] # no modules internals = [] # expose internal data structures unicode-xid-ident = ["unicode-xid"] # allow Unicode Standard Annex #31 for identifiers. -metadata = ["serde", "serde_json", "rhai_codegen/metadata"] # enable exporting functions metadata +metadata = ["serde", "serde_json", "rhai_codegen/metadata", "smartstring/serde"] # enable exporting functions metadata no_std = ["no-std-compat", "num-traits/libm", "core-error", "libm", "ahash/compile-time-rng"] diff --git a/README.md b/README.md index e11cf72f..7aa96bfb 100644 --- a/README.md +++ b/README.md @@ -79,8 +79,8 @@ The [`scripts`](https://github.com/rhaiscript/rhai/tree/master/scripts) subdirec Below is the standard _Fibonacci_ example for scripting languages: ```js -// This Rhai script calculates the n-th Fibonacci number using a really dumb algorithm -// to test the speed of the scripting engine. +// This Rhai script calculates the n-th Fibonacci number using a +// really dumb algorithm to test the speed of the scripting engine. const TARGET = 28; const REPEAT = 5;