Use no-std-compat to build no-std.

This commit is contained in:
Stephen Chung
2021-04-17 15:15:54 +08:00
parent 2f2b7403cb
commit 01f0cc028b
48 changed files with 293 additions and 293 deletions

View File

@@ -1,5 +1,7 @@
use crate::plugin::*;
use crate::{def_package, FnPtr, ImmutableString, NativeCallContext};
#[cfg(feature = "no_std")]
use std::prelude::v1::*;
def_package!(crate:BasicFnPackage:"Basic Fn functions.", lib, {
combine_with_exported_module!(lib, "FnPtr", fn_ptr_functions);
@@ -34,7 +36,8 @@ mod fn_ptr_functions {
#[cfg(not(feature = "no_index"))]
#[cfg(not(feature = "no_object"))]
fn collect_fn_metadata(ctx: NativeCallContext) -> crate::Array {
use crate::{ast::ScriptFnDef, stdlib::collections::BTreeSet, Array, Identifier, Map};
use crate::{ast::ScriptFnDef, Array, Identifier, Map};
use std::collections::BTreeSet;
// Create a metadata record for a function.
fn make_metadata(