diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-04 20:22:11 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-04 20:22:11 +0200 |
| commit | ef8aa763faa59fd62c90c6d6245e8d2c5eece35e (patch) | |
| tree | d36192af0c770b076a5004ba8bcae3c2df728c75 /src/library/mod.rs | |
| parent | a41d7ab47dda1e30465bdf91fd02bca0e634a38d (diff) | |
Shorten some names ↔
Diffstat (limited to 'src/library/mod.rs')
| -rw-r--r-- | src/library/mod.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/library/mod.rs b/src/library/mod.rs index c6dfb758..66fc5d59 100644 --- a/src/library/mod.rs +++ b/src/library/mod.rs @@ -22,18 +22,12 @@ macro_rules! std { /// Create a scope with all standard library functions. pub fn _std() -> Scope { let mut std = Scope::new(); - $(std.insert($name, wrap!($func));)* + $(std.set($name, ValueFunc::new(|args, ctx| Box::pin($func(args, ctx))));)* std } }; } -macro_rules! wrap { - ($func:expr) => { - ValueFunc::new(|args, ctx| Box::pin($func(args, ctx))) - }; -} - std! { "align" => align, "box" => boxed, |
