mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
Use alloc, core instead of std (#225)
- Replace std with alloc, core in most places in src Tests, bindings aren't changed. - Introduce BuiltinsMap type alias inplace of HashMap. In no_std case, this could be aliases to BTreeMap - Fix clippy warnings Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
0a39e434db
commit
69d6426663
+3
-3
@@ -47,7 +47,7 @@ use crate::ast::{Expr, Ref};
|
||||
use crate::lexer::Span;
|
||||
use crate::value::Value;
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::collections::HashMap as BuiltinsMap;
|
||||
|
||||
use anyhow::Result;
|
||||
use lazy_static::lazy_static;
|
||||
@@ -61,8 +61,8 @@ pub use deprecated::DEPRECATED;
|
||||
|
||||
#[rustfmt::skip]
|
||||
lazy_static! {
|
||||
pub static ref BUILTINS: HashMap<&'static str, BuiltinFcn> = {
|
||||
let mut m : HashMap<&'static str, BuiltinFcn> = HashMap::new();
|
||||
pub static ref BUILTINS: BuiltinsMap<&'static str, BuiltinFcn> = {
|
||||
let mut m : BuiltinsMap<&'static str, BuiltinFcn> = BuiltinsMap::new();
|
||||
|
||||
// comparison functions are directly called.
|
||||
numbers::register(&mut m);
|
||||
|
||||
Reference in New Issue
Block a user