From a6eafa71e54643964cfbf5e0c4e90e1a88358702 Mon Sep 17 00:00:00 2001 From: yukang Date: Fri, 29 Sep 2023 08:41:28 +0800 Subject: [PATCH] update jsonrpc-utils and remove missing_docs --- Cargo.lock | 8 ++++---- rpc/Cargo.toml | 2 +- rpc/README.md | 6 +++--- rpc/src/module/alert.rs | 1 - rpc/src/module/chain.rs | 1 - rpc/src/module/debug.rs | 1 - rpc/src/module/experiment.rs | 1 - rpc/src/module/indexer.rs | 1 - rpc/src/module/miner.rs | 1 - rpc/src/module/net.rs | 1 - rpc/src/module/pool.rs | 1 - rpc/src/module/stats.rs | 1 - rpc/src/module/subscription.rs | 7 +++---- rpc/src/module/test.rs | 1 - 14 files changed, 11 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 854a60aae11..c0f711abbfa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2788,9 +2788,9 @@ dependencies = [ [[package]] name = "jsonrpc-utils" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f93e501bda012e033e77c7bc87af91b5bcdc509b5c8dd69f46267d9b99b431" +checksum = "b1c90fdbaa763131c108245b8b12fe28b0d6bb5bf992a8a6f4a40433d50f6873" dependencies = [ "anyhow", "axum", @@ -2807,9 +2807,9 @@ dependencies = [ [[package]] name = "jsonrpc-utils-macros" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8727d2c8bb2833f22c4306879a5cf4cc4a8659170c211e9b523b86aab654f823" +checksum = "c5159dd39c68c8f844b369cb1b46beb253cd22ac70570021c550a6e0dc29f0c3" dependencies = [ "proc-macro2", "quote", diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 8f6d59f5b5e..7290923207a 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -24,7 +24,7 @@ ckb-app-config = { path = "../util/app-config", version = "= 0.112.0-pre" } ckb-constant = { path = "../util/constant", version = "= 0.112.0-pre" } jsonrpc-core = "18.0" serde_json = "1.0" -jsonrpc-utils = { version = "0.2.1", features = ["server", "macros", "axum"] } +jsonrpc-utils = { version = "0.2.2", features = ["server", "macros", "axum"] } ckb-jsonrpc-types = { path = "../util/jsonrpc-types", version = "= 0.112.0-pre" } ckb-verification = { path = "../verification", version = "= 0.112.0-pre" } ckb-verification-traits = { path = "../verification/traits", version = "= 0.112.0-pre" } diff --git a/rpc/README.md b/rpc/README.md index 67b9b850a6d..c0eb7a26055 100644 --- a/rpc/README.md +++ b/rpc/README.md @@ -4950,9 +4950,9 @@ Unsubscribe Response ``` { - "id": 42, - "jsonrpc": "2.0", - "result": true + "id": 42, + "jsonrpc": "2.0", + "result": true } ``` diff --git a/rpc/src/module/alert.rs b/rpc/src/module/alert.rs index 13edcc12d76..9cbfafd7fda 100644 --- a/rpc/src/module/alert.rs +++ b/rpc/src/module/alert.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] use crate::error::RPCError; use async_trait::async_trait; use ckb_jsonrpc_types::Alert; diff --git a/rpc/src/module/chain.rs b/rpc/src/module/chain.rs index aec813453f4..42143328637 100644 --- a/rpc/src/module/chain.rs +++ b/rpc/src/module/chain.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] use crate::error::RPCError; use crate::util::FeeRateCollector; use async_trait::async_trait; diff --git a/rpc/src/module/debug.rs b/rpc/src/module/debug.rs index 25517e952a7..350cbdd1c5c 100644 --- a/rpc/src/module/debug.rs +++ b/rpc/src/module/debug.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] use async_trait::async_trait; use ckb_jsonrpc_types::{ExtraLoggerConfig, MainLoggerConfig}; use ckb_logger_service::Logger; diff --git a/rpc/src/module/experiment.rs b/rpc/src/module/experiment.rs index 88ad52f31d7..55edc5dd5a1 100644 --- a/rpc/src/module/experiment.rs +++ b/rpc/src/module/experiment.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] use crate::error::RPCError; use crate::module::chain::CyclesEstimator; use async_trait::async_trait; diff --git a/rpc/src/module/indexer.rs b/rpc/src/module/indexer.rs index 39860fdc3d9..0d62d15a789 100644 --- a/rpc/src/module/indexer.rs +++ b/rpc/src/module/indexer.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] use crate::error::RPCError; use async_trait::async_trait; use ckb_indexer::IndexerHandle; diff --git a/rpc/src/module/miner.rs b/rpc/src/module/miner.rs index 53564dc6950..e6a344f0c92 100644 --- a/rpc/src/module/miner.rs +++ b/rpc/src/module/miner.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] use crate::error::RPCError; use async_trait::async_trait; use ckb_chain::chain::ChainController; diff --git a/rpc/src/module/net.rs b/rpc/src/module/net.rs index 243350fc7d6..289ffb1710a 100644 --- a/rpc/src/module/net.rs +++ b/rpc/src/module/net.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] use crate::error::RPCError; use async_trait::async_trait; use ckb_jsonrpc_types::{ diff --git a/rpc/src/module/pool.rs b/rpc/src/module/pool.rs index 5ec06f33f28..a67adaa9fd3 100644 --- a/rpc/src/module/pool.rs +++ b/rpc/src/module/pool.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] use crate::error::RPCError; use async_trait::async_trait; use ckb_chain_spec::consensus::Consensus; diff --git a/rpc/src/module/stats.rs b/rpc/src/module/stats.rs index bd2ccf896ac..b9adec9f4b5 100644 --- a/rpc/src/module/stats.rs +++ b/rpc/src/module/stats.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] use async_trait::async_trait; use ckb_jsonrpc_types::{AlertMessage, ChainInfo, DeploymentInfo, DeploymentPos, DeploymentsInfo}; use ckb_network_alert::notifier::Notifier as AlertNotifier; diff --git a/rpc/src/module/subscription.rs b/rpc/src/module/subscription.rs index 23b463fdc6d..3a5c9d2c74c 100644 --- a/rpc/src/module/subscription.rs +++ b/rpc/src/module/subscription.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] use async_trait::async_trait; use ckb_async_runtime::Handle; use ckb_jsonrpc_types::Topic; @@ -157,9 +156,9 @@ pub trait SubscriptionRpc { /// /// ```json /// { - /// "id": 42, - /// "jsonrpc": "2.0", - /// "result": true + /// "id": 42, + /// "jsonrpc": "2.0", + /// "result": true /// } /// ``` /// diff --git a/rpc/src/module/test.rs b/rpc/src/module/test.rs index d2c6d1be5d7..aef4e784caa 100644 --- a/rpc/src/module/test.rs +++ b/rpc/src/module/test.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] use crate::error::RPCError; use async_trait::async_trait; use ckb_chain::chain::ChainController;