Unverified Commit 42930f07 authored by Alexandru Vasile's avatar Alexandru Vasile Committed by GitHub
Browse files

Fix clippy (#861)



Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>

Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
parent 7eb5d47f
Pipeline #209979 passed with stages
in 5 minutes and 25 seconds
...@@ -270,8 +270,8 @@ fn ws_concurrent_conn_subs(rt: &TokioRuntime, crit: &mut Criterion, url: &str, n ...@@ -270,8 +270,8 @@ fn ws_concurrent_conn_subs(rt: &TokioRuntime, crit: &mut Criterion, url: &str, n
let fut = client.subscribe::<String>(SUB_METHOD_NAME, None, UNSUB_METHOD_NAME).then( let fut = client.subscribe::<String>(SUB_METHOD_NAME, None, UNSUB_METHOD_NAME).then(
|sub| async move { |sub| async move {
let mut s = sub.unwrap(); let mut s = sub.unwrap();
let res = s.next().await.unwrap().unwrap();
res s.next().await.unwrap().unwrap()
}, },
); );
......
...@@ -120,7 +120,7 @@ impl WsTransportClientBuilder { ...@@ -120,7 +120,7 @@ impl WsTransportClientBuilder {
} }
/// Stream mode, either plain TCP or TLS. /// Stream mode, either plain TCP or TLS.
#[derive(Clone, Copy, Debug, PartialEq)] #[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Mode { pub enum Mode {
/// Plain mode (`ws://` URL). /// Plain mode (`ws://` URL).
Plain, Plain,
......
...@@ -436,7 +436,7 @@ impl<T: Clone> RequestIdGuard<T> { ...@@ -436,7 +436,7 @@ impl<T: Clone> RequestIdGuard<T> {
} }
/// What certificate store to use /// What certificate store to use
#[derive(Clone, Copy, Debug, PartialEq)] #[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[non_exhaustive] #[non_exhaustive]
pub enum CertificateStore { pub enum CertificateStore {
/// Use the native system certificate store /// Use the native system certificate store
......
...@@ -32,7 +32,7 @@ use jsonrpsee_types::error::{ ...@@ -32,7 +32,7 @@ use jsonrpsee_types::error::{
}; };
/// Convenience type for displaying errors. /// Convenience type for displaying errors.
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, PartialEq, Eq)]
pub struct Mismatch<T> { pub struct Mismatch<T> {
/// Expected value. /// Expected value.
pub expected: T, pub expected: T,
......
...@@ -264,7 +264,7 @@ pub const BATCHES_NOT_SUPPORTED_MSG: &str = "Batched requests are not supported ...@@ -264,7 +264,7 @@ pub const BATCHES_NOT_SUPPORTED_MSG: &str = "Batched requests are not supported
pub const TOO_MANY_SUBSCRIPTIONS_MSG: &str = "Too many subscriptions on the connection"; pub const TOO_MANY_SUBSCRIPTIONS_MSG: &str = "Too many subscriptions on the connection";
/// JSONRPC error code /// JSONRPC error code
#[derive(Error, Debug, PartialEq, Copy, Clone)] #[derive(Error, Debug, PartialEq, Eq, Copy, Clone)]
pub enum ErrorCode { pub enum ErrorCode {
/// Invalid JSON was received by the server. /// Invalid JSON was received by the server.
/// An error occurred on the server while parsing the JSON text. /// An error occurred on the server while parsing the JSON text.
......
...@@ -39,7 +39,7 @@ use serde::{Deserialize, Serialize}; ...@@ -39,7 +39,7 @@ use serde::{Deserialize, Serialize};
use serde_json::Value as JsonValue; use serde_json::Value as JsonValue;
/// JSON-RPC v2 marker type. /// JSON-RPC v2 marker type.
#[derive(Clone, Copy, Debug, Default, PartialEq)] #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub struct TwoPointZero; pub struct TwoPointZero;
struct TwoPointZeroVisitor; struct TwoPointZeroVisitor;
...@@ -168,7 +168,7 @@ impl<'a> ParamsSequence<'a> { ...@@ -168,7 +168,7 @@ impl<'a> ParamsSequence<'a> {
{ {
let mut json = self.0; let mut json = self.0;
tracing::trace!("[next_inner] Params JSON: {:?}", json); tracing::trace!("[next_inner] Params JSON: {:?}", json);
match json.as_bytes().get(0)? { match json.as_bytes().first()? {
b']' => { b']' => {
self.0 = ""; self.0 = "";
......
...@@ -56,7 +56,7 @@ impl<'a> Request<'a> { ...@@ -56,7 +56,7 @@ impl<'a> Request<'a> {
} }
/// JSON-RPC Invalid request as defined in the [spec](https://www.jsonrpc.org/specification#request-object). /// JSON-RPC Invalid request as defined in the [spec](https://www.jsonrpc.org/specification#request-object).
#[derive(Deserialize, Debug, PartialEq)] #[derive(Deserialize, Debug, PartialEq, Eq)]
pub struct InvalidRequest<'a> { pub struct InvalidRequest<'a> {
/// Request ID /// Request ID
#[serde(borrow)] #[serde(borrow)]
......
...@@ -463,7 +463,7 @@ async fn background_task<L: Logger>(input: BackgroundTask<'_, L>) -> Result<(), ...@@ -463,7 +463,7 @@ async fn background_task<L: Logger>(input: BackgroundTask<'_, L>) -> Result<(),
methods, methods,
bounded_subscriptions, bounded_subscriptions,
sink: &sink, sink: &sink,
id_provider: &*id_provider, id_provider,
logger, logger,
request_start, request_start,
}; };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment