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

graceful shutdown: distinguish between stopped and conn closed #1220

Merged
merged 2 commits into from
Oct 19, 2023

grumbles: ws_stream fuse

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

graceful shutdown: distinguish between stopped and conn closed #1220

grumbles: ws_stream fuse
539ab67
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Oct 19, 2023 in 0s

clippy

1 warning

Details

Results

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

Versions

  • rustc 1.73.0 (cc66ad468 2023-10-03)
  • cargo 1.73.0 (9c4383fb5 2023-08-26)
  • clippy 0.1.73 (cc66ad4 2023-10-03)

Annotations

Check warning on line 448 in core/src/server/subscription.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

returning the result of a `let` binding from a block

warning: returning the result of a `let` binding from a block
   --> core/src/server/subscription.rs:448:3
    |
441 | /         let res = match serde_json::from_str::<SubscriptionResponse<T>>(&raw) {
442 | |             Ok(r) => Some(Ok((r.params.result, r.params.subscription.into_owned()))),
443 | |             Err(e) => match serde_json::from_str::<SubscriptionError<serde_json::Value>>(&raw) {
444 | |                 Ok(_) => None,
445 | |                 Err(_) => Some(Err(e.into())),
446 | |             },
447 | |         };
    | |__________- unnecessary `let` binding
448 |           res
    |           ^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
    = note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
    |
441 ~         
442 ~         match serde_json::from_str::<SubscriptionResponse<T>>(&raw) {
443 ~             Ok(r) => Some(Ok((r.params.result, r.params.subscription.into_owned()))),
444 ~             Err(e) => match serde_json::from_str::<SubscriptionError<serde_json::Value>>(&raw) {
445 ~                 Ok(_) => None,
446 ~                 Err(_) => Some(Err(e.into())),
447 ~             },
448 ~         }
    |