Remove PackageLibrary and PackagesCollection.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
//! Configuration settings for [`Engine`].
|
||||
|
||||
use crate::packages::PackageLibrary;
|
||||
use crate::stdlib::{format, string::String};
|
||||
use crate::token::{is_valid_identifier, Token};
|
||||
use crate::Engine;
|
||||
use crate::{Engine, Module, Shared};
|
||||
|
||||
#[cfg(not(feature = "no_module"))]
|
||||
use crate::stdlib::boxed::Box;
|
||||
@@ -15,8 +14,8 @@ impl Engine {
|
||||
/// When searching for functions, packages loaded later are preferred.
|
||||
/// In other words, loaded packages are searched in reverse order.
|
||||
#[inline(always)]
|
||||
pub fn load_package(&mut self, package: impl Into<PackageLibrary>) -> &mut Self {
|
||||
self.packages.add(package.into());
|
||||
pub fn load_package(&mut self, package: impl Into<Shared<Module>>) -> &mut Self {
|
||||
self.packages.insert(0, package.into());
|
||||
self
|
||||
}
|
||||
/// Control whether and how the [`Engine`] will optimize an [`AST`][crate::AST] after compilation.
|
||||
|
Reference in New Issue
Block a user