graceful shutdown: distinguish between stopped and conn closed #1220
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
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 ~ }
|
Loading