From 29c015508a454499bab7b76d65b88fcd6bf51d96 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Mon, 10 Apr 2023 15:06:40 -0700 Subject: [PATCH] fix warnings in cargo doc --- rate-counter/src/lib.rs | 2 -- web3_proxy/src/app/mod.rs | 2 +- web3_proxy/src/frontend/mod.rs | 2 +- web3_proxy/src/rpcs/blockchain.rs | 2 +- web3_proxy/src/rpcs/consensus.rs | 6 +++--- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/rate-counter/src/lib.rs b/rate-counter/src/lib.rs index 23f41099..11a8359e 100644 --- a/rate-counter/src/lib.rs +++ b/rate-counter/src/lib.rs @@ -1,6 +1,4 @@ //! A counter of events in a time period. -//! -//! TODO: maybe better to do something like this though: https://github.com/facebookarchive/metrics/blob/master/ewma.go use std::collections::VecDeque; use tokio::time::{Duration, Instant}; diff --git a/web3_proxy/src/app/mod.rs b/web3_proxy/src/app/mod.rs index 5576f0a6..21ba8d8b 100644 --- a/web3_proxy/src/app/mod.rs +++ b/web3_proxy/src/app/mod.rs @@ -160,7 +160,7 @@ pub type AnyhowJoinHandle = JoinHandle>; pub struct AuthorizationChecks { /// database id of the primary user. 0 if anon /// TODO: do we need this? its on the authorization so probably not - /// TODO: Option? + /// TODO: `Option`? they are actual zeroes some places in the db now pub user_id: u64, /// the key used (if any) pub rpc_secret_key: Option, diff --git a/web3_proxy/src/frontend/mod.rs b/web3_proxy/src/frontend/mod.rs index 549ef287..74dd29aa 100644 --- a/web3_proxy/src/frontend/mod.rs +++ b/web3_proxy/src/frontend/mod.rs @@ -1,6 +1,6 @@ //! `frontend` contains HTTP and websocket endpoints for use by a website or web3 wallet. //! -//! Important reading about axum extractors: https://docs.rs/axum/latest/axum/extract/index.html#the-order-of-extractors +//! Important reading about axum extractors: pub mod admin; pub mod authorization; diff --git a/web3_proxy/src/rpcs/blockchain.rs b/web3_proxy/src/rpcs/blockchain.rs index bcc6e0fb..18abc471 100644 --- a/web3_proxy/src/rpcs/blockchain.rs +++ b/web3_proxy/src/rpcs/blockchain.rs @@ -197,7 +197,7 @@ impl Web3Rpcs { /// Get a block from caches with fallback. /// Will query a specific node or the best available. - /// TODO: return Web3ProxyResult>? + /// TODO: return `Web3ProxyResult>`? pub async fn block( &self, authorization: &Arc, diff --git a/web3_proxy/src/rpcs/consensus.rs b/web3_proxy/src/rpcs/consensus.rs index 54eb2c1d..9ea267d9 100644 --- a/web3_proxy/src/rpcs/consensus.rs +++ b/web3_proxy/src/rpcs/consensus.rs @@ -90,9 +90,9 @@ type FirstSeenCache = Cache, Web3ProxyBlock>, /// never serve blocks that are too old