Fix dropping issues with StaticVec and use it everywhere.

This commit is contained in:
Stephen Chung
2020-05-17 00:24:07 +08:00
parent 0cb781c1aa
commit a2c50879fe
11 changed files with 313 additions and 145 deletions

View File

@@ -2,6 +2,7 @@
use crate::fn_native::{NativeCallable, SharedIteratorFunction};
use crate::module::Module;
use crate::utils::StaticVec;
use crate::stdlib::{any::TypeId, boxed::Box, collections::HashMap, rc::Rc, sync::Arc, vec::Vec};
@@ -54,7 +55,7 @@ pub type PackageLibrary = Arc<Module>;
#[derive(Clone, Default)]
pub(crate) struct PackagesCollection {
/// Collection of `PackageLibrary` instances.
packages: Vec<PackageLibrary>,
packages: StaticVec<PackageLibrary>,
}
impl PackagesCollection {