Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(client): disconnect_reason/read_error is cancel-safe #1347

Merged
merged 3 commits into from
Apr 8, 2024

remove async_lock dependency

b7e0237
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

fix(client): disconnect_reason/read_error is cancel-safe #1347

remove async_lock dependency
b7e0237
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Apr 8, 2024 in 0s

clippy

3 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 3
Note 0
Help 0

Versions

  • rustc 1.77.1 (7cf61ebde 2024-03-27)
  • cargo 1.77.1 (e52e36006 2024-03-26)
  • clippy 0.1.77 (7cf61eb 2024-03-27)

Annotations

Check warning on line 169 in proc-macros/src/render_server.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `else { if .. }` block can be collapsed

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 ~                         }
    |

Check warning on line 169 in proc-macros/src/render_server.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `else { if .. }` block can be collapsed

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 ~                         }
    |

Check warning on line 169 in proc-macros/src/render_server.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `else { if .. }` block can be collapsed

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 ~                         }
    |