Skip to content

WIP: feat: client rpc middleware #4329

WIP: feat: client rpc middleware

WIP: feat: client rpc middleware #4329

Triggered via pull request February 26, 2025 09:55
Status Failure
Total duration 5m 52s
Artifacts

ci.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

12 errors and 52 warnings
Check
Process completed with exit code 1.
Check rustdoc
Process completed with exit code 101.
Test wasm
Process completed with exit code 1.
Run tests macos
The process '/Users/runner/.cargo/bin/cargo' failed with exit code 101
Run tests macos
ENOENT: no such file or directory, opendir '/Users/runner/work/jsonrpsee/jsonrpsee/target/tests/target'
Run tests macos
Error: ENOENT: no such file or directory, opendir '/Users/runner/work/jsonrpsee/jsonrpsee/target/tests/target'
Run tests Ubuntu
ENOENT: no such file or directory, opendir '/home/runner/work/jsonrpsee/jsonrpsee/target/tests/target'
Run tests Ubuntu
Error: ENOENT: no such file or directory, opendir '/home/runner/work/jsonrpsee/jsonrpsee/target/tests/target'
Run tests Ubuntu
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
Run tests Windows
ENOENT: no such file or directory, opendir 'D:\a\jsonrpsee\jsonrpsee\target\tests\target'
Run tests Windows
Error: ENOENT: no such file or directory, opendir 'D:\a\jsonrpsee\jsonrpsee\target\tests\target'
Run tests Windows
The process 'C:\Users\runneradmin\.cargo\bin\cargo.exe' failed with exit code 101
Check
New version for cargo-machete available: 0.8.0
Check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Check
New version for cargo-hack available: 0.6.35
useless conversion to the same type: `serde_json::Error`: core/src/client/mod.rs#L428
warning: useless conversion to the same type: `serde_json::Error` --> core/src/client/mod.rs:428:54 | 428 | Some(v) => Some(serde_json::from_value::<Notif>(v).map_err(Into::into)), | ^^^^^^^^^^^^^^^^^^^^ help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `server::error::TrySendError`: core/src/server/subscription.rs#L402
warning: useless conversion to the same type: `server::error::TrySendError` --> core/src/server/subscription.rs:402:28 | 402 | self.inner.try_send(json).map_err(Into::into) | __________________________________-^^^^^^^^^^^^^^^^^^^ 403 | | } | |____- help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `server::error::SendTimeoutError`: core/src/server/subscription.rs#L386
warning: useless conversion to the same type: `server::error::SendTimeoutError` --> core/src/server/subscription.rs:386:47 | 386 | self.inner.send_timeout(json, timeout).await.map_err(Into::into) | _____________________________________________________-^^^^^^^^^^^^^^^^^^^ 387 | | } | |____- help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `server::error::DisconnectError`: core/src/server/subscription.rs#L375
warning: useless conversion to the same type: `server::error::DisconnectError` --> core/src/server/subscription.rs:375:30 | 375 | self.inner.send(json).await.map_err(Into::into) | ____________________________________-^^^^^^^^^^^^^^^^^^^ 376 | | } | |____- help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
useless conversion to the same type: `soketto::connection::Error`: server/src/transport/ws.rs#L48
warning: useless conversion to the same type: `soketto::connection::Error` --> server/src/transport/ws.rs:48:22 | 48 | sender.flush().await.map_err(Into::into) | _________________________-^^^^^^^^^^^^^^^^^^^ 49 | | } | |_- help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `soketto::connection::Error`: server/src/transport/ws.rs#L38
warning: useless conversion to the same type: `soketto::connection::Error` --> server/src/transport/ws.rs:38:22 | 38 | sender.flush().await.map_err(Into::into) | _________________________-^^^^^^^^^^^^^^^^^^^ 39 | | } | |_- help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
this `map_or` can be simplified: server/src/transport/http.rs#L22
warning: this `map_or` can be simplified --> server/src/transport/http.rs:22:2 | 22 | / content_type.and_then(|val| val.to_str().ok()).map_or(false, |content| { 23 | | content.eq_ignore_ascii_case("application/json") 24 | | || content.eq_ignore_ascii_case("application/json; charset=utf-8") 25 | | || content.eq_ignore_ascii_case("application/json;charset=utf-8") ... | 28 | | || content.eq_ignore_ascii_case("application/json-rpc; charset=utf-8") 29 | | }) | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or = note: `#[warn(clippy::unnecessary_map_or)]` on by default help: use is_some_and instead | 22 ~ content_type.and_then(|val| val.to_str().ok()).is_some_and(|content| { 23 ~ content.eq_ignore_ascii_case("application/json") 24 ~ || content.eq_ignore_ascii_case("application/json; charset=utf-8") 25 ~ || content.eq_ignore_ascii_case("application/json;charset=utf-8") 26 ~ || content.eq_ignore_ascii_case("application/json-rpc") 27 ~ || content.eq_ignore_ascii_case("application/json-rpc;charset=utf-8") 28 ~ || content.eq_ignore_ascii_case("application/json-rpc; charset=utf-8") 29 ~ }) |
length comparison to zero: server/src/server.rs#L1285
warning: length comparison to zero --> server/src/server.rs:1285:20 | 1285 | if got_notif && batch_response.as_result().len() == 0 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `batch_response.as_result().is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `#[warn(clippy::len_zero)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: client/http-client/src/client.rs#L433
warning: this expression creates a reference which is immediately dereferenced by the compiler --> client/http-client/src/client.rs:433:70 | 433 | let responses: Vec<Response<&JsonRawValue>> = serde_json::from_str(&batch.as_result()).unwrap(); | ^^^^^^^^^^^^^^^^^^ help: change this to: `batch.as_result()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: client/http-client/src/client.rs#L396
warning: this expression creates a reference which is immediately dereferenced by the compiler --> client/http-client/src/client.rs:396:92 | 396 | let response = ResponseSuccess::try_from(serde_json::from_str::<Response<&JsonRawValue>>(&rp.as_result())?)?; | ^^^^^^^^^^^^^^^ help: change this to: `rp.as_result()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
useless conversion to the same type: `soketto::connection::Error`: server/src/transport/ws.rs#L38
warning: useless conversion to the same type: `soketto::connection::Error` --> server/src/transport/ws.rs:38:22 | 38 | sender.flush().await.map_err(Into::into) | _________________________-^^^^^^^^^^^^^^^^^^^ 39 | | } | |_- help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
this `map_or` can be simplified: server/src/transport/http.rs#L22
warning: this `map_or` can be simplified --> server/src/transport/http.rs:22:2 | 22 | / content_type.and_then(|val| val.to_str().ok()).map_or(false, |content| { 23 | | content.eq_ignore_ascii_case("application/json") 24 | | || content.eq_ignore_ascii_case("application/json; charset=utf-8") 25 | | || content.eq_ignore_ascii_case("application/json;charset=utf-8") ... | 28 | | || content.eq_ignore_ascii_case("application/json-rpc; charset=utf-8") 29 | | }) | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or = note: `#[warn(clippy::unnecessary_map_or)]` on by default help: use is_some_and instead | 22 ~ content_type.and_then(|val| val.to_str().ok()).is_some_and(|content| { 23 ~ content.eq_ignore_ascii_case("application/json") 24 ~ || content.eq_ignore_ascii_case("application/json; charset=utf-8") 25 ~ || content.eq_ignore_ascii_case("application/json;charset=utf-8") 26 ~ || content.eq_ignore_ascii_case("application/json-rpc") 27 ~ || content.eq_ignore_ascii_case("application/json-rpc;charset=utf-8") 28 ~ || content.eq_ignore_ascii_case("application/json-rpc; charset=utf-8") 29 ~ }) |
length comparison to zero: server/src/server.rs#L1285
warning: length comparison to zero --> server/src/server.rs:1285:20 | 1285 | if got_notif && batch_response.as_result().len() == 0 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `batch_response.as_result().is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `#[warn(clippy::len_zero)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: client/http-client/src/client.rs#L433
warning: this expression creates a reference which is immediately dereferenced by the compiler --> client/http-client/src/client.rs:433:70 | 433 | let responses: Vec<Response<&JsonRawValue>> = serde_json::from_str(&batch.as_result()).unwrap(); | ^^^^^^^^^^^^^^^^^^ help: change this to: `batch.as_result()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: client/http-client/src/client.rs#L396
warning: this expression creates a reference which is immediately dereferenced by the compiler --> client/http-client/src/client.rs:396:92 | 396 | let response = ResponseSuccess::try_from(serde_json::from_str::<Response<&JsonRawValue>>(&rp.as_result())?)?; | ^^^^^^^^^^^^^^^ help: change this to: `rp.as_result()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
this `map_or` can be simplified: server/src/transport/http.rs#L22
warning: this `map_or` can be simplified --> server/src/transport/http.rs:22:2 | 22 | / content_type.and_then(|val| val.to_str().ok()).map_or(false, |content| { 23 | | content.eq_ignore_ascii_case("application/json") 24 | | || content.eq_ignore_ascii_case("application/json; charset=utf-8") 25 | | || content.eq_ignore_ascii_case("application/json;charset=utf-8") ... | 28 | | || content.eq_ignore_ascii_case("application/json-rpc; charset=utf-8") 29 | | }) | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or = note: `#[warn(clippy::unnecessary_map_or)]` on by default help: use is_some_and instead | 22 ~ content_type.and_then(|val| val.to_str().ok()).is_some_and(|content| { 23 ~ content.eq_ignore_ascii_case("application/json") 24 ~ || content.eq_ignore_ascii_case("application/json; charset=utf-8") 25 ~ || content.eq_ignore_ascii_case("application/json;charset=utf-8") 26 ~ || content.eq_ignore_ascii_case("application/json-rpc") 27 ~ || content.eq_ignore_ascii_case("application/json-rpc;charset=utf-8") 28 ~ || content.eq_ignore_ascii_case("application/json-rpc; charset=utf-8") 29 ~ }) |
length comparison to zero: server/src/server.rs#L1285
warning: length comparison to zero --> server/src/server.rs:1285:20 | 1285 | if got_notif && batch_response.as_result().len() == 0 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `batch_response.as_result().is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `#[warn(clippy::len_zero)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: client/http-client/src/client.rs#L433
warning: this expression creates a reference which is immediately dereferenced by the compiler --> client/http-client/src/client.rs:433:70 | 433 | let responses: Vec<Response<&JsonRawValue>> = serde_json::from_str(&batch.as_result()).unwrap(); | ^^^^^^^^^^^^^^^^^^ help: change this to: `batch.as_result()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: client/http-client/src/client.rs#L396
warning: this expression creates a reference which is immediately dereferenced by the compiler --> client/http-client/src/client.rs:396:92 | 396 | let response = ResponseSuccess::try_from(serde_json::from_str::<Response<&JsonRawValue>>(&rp.as_result())?)?; | ^^^^^^^^^^^^^^^ help: change this to: `rp.as_result()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
useless conversion to the same type: `serde_json::Error`: core/src/client/mod.rs#L428
warning: useless conversion to the same type: `serde_json::Error` --> core/src/client/mod.rs:428:54 | 428 | Some(v) => Some(serde_json::from_value::<Notif>(v).map_err(Into::into)), | ^^^^^^^^^^^^^^^^^^^^ help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `server::error::TrySendError`: core/src/server/subscription.rs#L402
warning: useless conversion to the same type: `server::error::TrySendError` --> core/src/server/subscription.rs:402:28 | 402 | self.inner.try_send(json).map_err(Into::into) | __________________________________-^^^^^^^^^^^^^^^^^^^ 403 | | } | |____- help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `server::error::SendTimeoutError`: core/src/server/subscription.rs#L386
warning: useless conversion to the same type: `server::error::SendTimeoutError` --> core/src/server/subscription.rs:386:47 | 386 | self.inner.send_timeout(json, timeout).await.map_err(Into::into) | _____________________________________________________-^^^^^^^^^^^^^^^^^^^ 387 | | } | |____- help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `server::error::DisconnectError`: core/src/server/subscription.rs#L375
warning: useless conversion to the same type: `server::error::DisconnectError` --> core/src/server/subscription.rs:375:30 | 375 | self.inner.send(json).await.map_err(Into::into) | ____________________________________-^^^^^^^^^^^^^^^^^^^ 376 | | } | |____- help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
useless conversion to the same type: `serde_json::Error`: core/src/client/mod.rs#L428
warning: useless conversion to the same type: `serde_json::Error` --> core/src/client/mod.rs:428:54 | 428 | Some(v) => Some(serde_json::from_value::<Notif>(v).map_err(Into::into)), | ^^^^^^^^^^^^^^^^^^^^ help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `server::error::TrySendError`: core/src/server/subscription.rs#L402
warning: useless conversion to the same type: `server::error::TrySendError` --> core/src/server/subscription.rs:402:28 | 402 | self.inner.try_send(json).map_err(Into::into) | __________________________________-^^^^^^^^^^^^^^^^^^^ 403 | | } | |____- help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `server::error::SendTimeoutError`: core/src/server/subscription.rs#L386
warning: useless conversion to the same type: `server::error::SendTimeoutError` --> core/src/server/subscription.rs:386:47 | 386 | self.inner.send_timeout(json, timeout).await.map_err(Into::into) | _____________________________________________________-^^^^^^^^^^^^^^^^^^^ 387 | | } | |____- help: consider removing | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check style
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Check style
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Check style
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Check style
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Check rustdoc
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Check rustdoc
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Check rustdoc
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Check rustdoc
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Run tests macos
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Run tests macos
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Run tests macos
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Run tests macos
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Run tests Ubuntu
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Run tests Ubuntu
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Run tests Ubuntu
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Run tests Ubuntu
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Run tests Windows
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Run tests Windows
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Run tests Windows
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Run tests Windows
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/