Streamline string handling.

This commit is contained in:
Stephen Chung
2021-03-24 13:17:52 +08:00
parent 3a1e93e324
commit c4fe1782df
12 changed files with 129 additions and 82 deletions

View File

@@ -6,7 +6,7 @@ use crate::module::NamespaceRef;
use crate::stdlib::{
borrow::Cow,
boxed::Box,
collections::BTreeMap,
collections::{BTreeMap, BTreeSet},
fmt,
hash::Hash,
num::NonZeroUsize,
@@ -58,7 +58,7 @@ pub struct ScriptFnDef {
pub params: StaticVec<ImmutableString>,
/// Access to external variables.
#[cfg(not(feature = "no_closure"))]
pub externals: StaticVec<ImmutableString>,
pub externals: BTreeSet<ImmutableString>,
/// Function doc-comments (if any).
pub comments: StaticVec<String>,
}