server: Register raw method with connection ID #282
Annotations
3 warnings
this `else { if .. }` block can be collapsed:
proc-macros/src/render_server.rs#L150
warning: this `else { if .. }` block can be collapsed
--> proc-macros/src/render_server.rs:150:12
|
150 | } else {
| ________________________^
151 | | if method.signature.sig.asyncness.is_some() {
152 | | handle_register_result(quote! {
153 | | rpc.register_async_method(#rpc_method_name, |params, context| async move {
... |
168 | | }
169 | | }
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
150 ~ } else if method.signature.sig.asyncness.is_some() {
151 ~ handle_register_result(quote! {
152 ~ rpc.register_async_method(#rpc_method_name, |params, context| async move {
153 ~ #parsing
154 ~ #into_response::into_response(context.as_ref().#rust_method_name(#params_seq).await)
155 ~ })
156 ~ })
157 ~ } else {
158 ~ let register_kind =
159 ~ if method.blocking { quote!(register_blocking_method) } else { quote!(register_method) };
160 +
161 ~ handle_register_result(quote! {
162 ~ rpc.#register_kind(#rpc_method_name, |params, context| {
163 ~ #parsing
164 ~ #into_response::into_response(context.#rust_method_name(#params_seq))
165 ~ })
166 ~ })
167 ~ }
|
|
this `else { if .. }` block can be collapsed:
proc-macros/src/render_server.rs#L150
warning: this `else { if .. }` block can be collapsed
--> proc-macros/src/render_server.rs:150:12
|
150 | } else {
| ________________________^
151 | | if method.signature.sig.asyncness.is_some() {
152 | | handle_register_result(quote! {
153 | | rpc.register_async_method(#rpc_method_name, |params, context| async move {
... |
168 | | }
169 | | }
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
150 ~ } else if method.signature.sig.asyncness.is_some() {
151 ~ handle_register_result(quote! {
152 ~ rpc.register_async_method(#rpc_method_name, |params, context| async move {
153 ~ #parsing
154 ~ #into_response::into_response(context.as_ref().#rust_method_name(#params_seq).await)
155 ~ })
156 ~ })
157 ~ } else {
158 ~ let register_kind =
159 ~ if method.blocking { quote!(register_blocking_method) } else { quote!(register_method) };
160 +
161 ~ handle_register_result(quote! {
162 ~ rpc.#register_kind(#rpc_method_name, |params, context| {
163 ~ #parsing
164 ~ #into_response::into_response(context.#rust_method_name(#params_seq))
165 ~ })
166 ~ })
167 ~ }
|
|
this `else { if .. }` block can be collapsed:
proc-macros/src/render_server.rs#L150
warning: this `else { if .. }` block can be collapsed
--> proc-macros/src/render_server.rs:150:12
|
150 | } else {
| ________________________^
151 | | if method.signature.sig.asyncness.is_some() {
152 | | handle_register_result(quote! {
153 | | rpc.register_async_method(#rpc_method_name, |params, context| async move {
... |
168 | | }
169 | | }
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
150 ~ } else if method.signature.sig.asyncness.is_some() {
151 ~ handle_register_result(quote! {
152 ~ rpc.register_async_method(#rpc_method_name, |params, context| async move {
153 ~ #parsing
154 ~ #into_response::into_response(context.as_ref().#rust_method_name(#params_seq).await)
155 ~ })
156 ~ })
157 ~ } else {
158 ~ let register_kind =
159 ~ if method.blocking { quote!(register_blocking_method) } else { quote!(register_method) };
160 +
161 ~ handle_register_result(quote! {
162 ~ rpc.#register_kind(#rpc_method_name, |params, context| {
163 ~ #parsing
164 ~ #into_response::into_response(context.#rust_method_name(#params_seq))
165 ~ })
166 ~ })
167 ~ }
|
|