mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
- 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>
22 lines
572 B
Rust
22 lines
572 B
Rust
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
use crate::ast::{Expr, Ref};
|
|
use crate::builtins;
|
|
use crate::builtins::utils::ensure_args_count;
|
|
|
|
use crate::lexer::Span;
|
|
use crate::value::Value;
|
|
|
|
use anyhow::Result;
|
|
|
|
pub fn register(m: &mut builtins::BuiltinsMap<&'static str, builtins::BuiltinFcn>) {
|
|
m.insert("http.send", (send, 1));
|
|
}
|
|
|
|
fn send(span: &Span, params: &[Ref<Expr>], args: &[Value], _strict: bool) -> Result<Value> {
|
|
let name = "http.send";
|
|
ensure_args_count(span, name, params, args, 1)?;
|
|
Ok(Value::Undefined)
|
|
}
|