From 35a6ea76af0b44412f4c69bf1b2b4ad671df5b8f Mon Sep 17 00:00:00 2001 From: qima Date: Fri, 20 Dec 2024 22:28:53 +0800 Subject: [PATCH] fix(doc): resolve couple of typos --- ant-bootstrap/src/cache_store.rs | 4 ++-- ant-bootstrap/src/contacts.rs | 4 ++-- ant-protocol/src/storage/scratchpad.rs | 2 +- node-launchpad/src/error.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ant-bootstrap/src/cache_store.rs b/ant-bootstrap/src/cache_store.rs index cb3732148c..4f9a0fd495 100644 --- a/ant-bootstrap/src/cache_store.rs +++ b/ant-bootstrap/src/cache_store.rs @@ -148,7 +148,7 @@ impl BootstrapCacheStore { &self.config } - /// Create a empty CacheStore with the given configuration + /// Create an empty CacheStore with the given configuration pub fn new(config: BootstrapCacheConfig) -> Result { info!("Creating new CacheStore with config: {:?}", config); let cache_path = config.cache_file_path.clone(); @@ -172,7 +172,7 @@ impl BootstrapCacheStore { Ok(store) } - /// Create a empty CacheStore from the given peers argument. + /// Create an empty CacheStore from the given peers argument. /// This also modifies the cfg if provided based on the PeersArgs. /// And also performs some actions based on the PeersArgs. /// diff --git a/ant-bootstrap/src/contacts.rs b/ant-bootstrap/src/contacts.rs index b121f54e0c..61e5026991 100644 --- a/ant-bootstrap/src/contacts.rs +++ b/ant-bootstrap/src/contacts.rs @@ -28,7 +28,7 @@ const MAINNET_CONTACTS: &[&str] = &[ const FETCH_TIMEOUT_SECS: u64 = 30; /// Maximum number of endpoints to fetch at a time const MAX_CONCURRENT_FETCHES: usize = 3; -/// The max number of retries for a endpoint on failure. +/// The max number of retries for an endpoint on failure. const MAX_RETRIES_ON_FETCH_FAILURE: usize = 3; /// Discovers initial peers from a list of endpoints @@ -228,7 +228,7 @@ impl ContactsFetcher { Ok(bootstrap_addresses) } - /// Try to parse a response from a endpoint + /// Try to parse a response from an endpoint fn try_parse_response(response: &str, ignore_peer_id: bool) -> Result> { match serde_json::from_str::(response) { Ok(json_endpoints) => { diff --git a/ant-protocol/src/storage/scratchpad.rs b/ant-protocol/src/storage/scratchpad.rs index 1022941de2..97f0d2dda4 100644 --- a/ant-protocol/src/storage/scratchpad.rs +++ b/ant-protocol/src/storage/scratchpad.rs @@ -15,7 +15,7 @@ use serde::{Deserialize, Serialize}; use xor_name::XorName; -/// Scratchpad, an mutable address for encrypted data +/// Scratchpad, a mutable address for encrypted data #[derive( Hash, Eq, PartialEq, PartialOrd, Ord, Clone, custom_debug::Debug, Serialize, Deserialize, )] diff --git a/node-launchpad/src/error.rs b/node-launchpad/src/error.rs index 14005a87a6..fb2a41c2fb 100644 --- a/node-launchpad/src/error.rs +++ b/node-launchpad/src/error.rs @@ -13,7 +13,7 @@ use ratatui::{ /// Error popup is a popup that is used to display error messages to the user. /// -/// It accepts a title, a message and a error message. +/// It accepts a title, a message and an error message. /// Handles key events to hide the popup (Enter and Esc keys). /// /// How to use: