diff --git a/doc/src/start/builds/minimal.md b/doc/src/start/builds/minimal.md index d1da0f01..46b85007 100644 --- a/doc/src/start/builds/minimal.md +++ b/doc/src/start/builds/minimal.md @@ -31,8 +31,8 @@ Opt-Out of Features ------------------ Opt out of as many features as possible, if they are not needed, to reduce code size because, remember, by default -all code is compiled in as what a script requires cannot be predicted. If a language feature is not needed, -omitting them via special features is a prudent strategy to optimize the build for size. +all code is compiled into the final binary since what a script requires cannot be predicted. +If a language feature will never be needed, omitting it is a prudent strategy to optimize the build for size. Omitting arrays ([`no_index`]) yields the most code-size savings, followed by floating-point support ([`no_float`]), checked arithmetic/script resource limits ([`unchecked`]) and finally object maps and custom types ([`no_object`]). diff --git a/doc/src/start/builds/no-std.md b/doc/src/start/builds/no-std.md index 22b9b025..46a8e986 100644 --- a/doc/src/start/builds/no-std.md +++ b/doc/src/start/builds/no-std.md @@ -7,3 +7,9 @@ The feature [`no_std`] automatically converts the scripting engine into a `no-st Usually, a `no-std` build goes hand-in-hand with [minimal builds] because typical embedded hardware (the primary target for `no-std`) has limited storage. + + +Nightly Required +---------------- + +Currently, [`no_std`] requires the nightly compiler due to the crates that it uses. diff --git a/src/parser.rs b/src/parser.rs index 3f79d089..a256deef 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -25,7 +25,7 @@ use crate::stdlib::{ char, collections::HashMap, fmt, format, - hash::Hash, + hash::{Hash, Hasher}, iter::empty, mem, num::NonZeroUsize, @@ -674,7 +674,7 @@ impl Default for Expr { } impl Hash for Expr { - fn hash(&self, state: &mut H) { + fn hash(&self, state: &mut H) { match self { Self::FloatConstant(x) => { state.write(&x.0.to_le_bytes());