mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-16 16:20:49 +00:00
feat(runtime-core) func!
supports closures.
This patch allows to write: ```rs func!(|…| -> … { … }) ```
This commit is contained in:
parent
72864934f9
commit
82e4d8e6cc
@ -47,7 +47,7 @@ macro_rules! trace {
|
||||
/// Helper macro to create a new `Func` object using the provided function pointer.
|
||||
#[macro_export]
|
||||
macro_rules! func {
|
||||
($func:path) => {{
|
||||
($func:expr) => {{
|
||||
$crate::Func::new($func)
|
||||
}};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user