diff --git a/juniper/src/macros/tests/field.rs b/juniper/src/macros/tests/field.rs index c2e2754a..1b9c4268 100644 --- a/juniper/src/macros/tests/field.rs +++ b/juniper/src/macros/tests/field.rs @@ -95,8 +95,6 @@ impl Root { Ok(0) } - /* - * FIXME: make this work again fn with_return() -> i32 { return 0; } @@ -104,7 +102,6 @@ impl Root { fn with_return_field_result() -> FieldResult { return Ok(0); } - */ } graphql_interface!(Interface: () |&self| { diff --git a/juniper_codegen/src/util.rs b/juniper_codegen/src/util.rs index ba6b81ea..3182aedb 100644 --- a/juniper_codegen/src/util.rs +++ b/juniper_codegen/src/util.rs @@ -751,7 +751,7 @@ impl GraphQLTypeDefiniton { }; quote!( #name => { - let res #_type = { #code }; + let res #_type = (|| { #code })(); #juniper_crate_name::IntoResolvable::into( res, executor.context()