diff --git a/faucet/src/faucet.rs b/faucet/src/faucet.rs index 428a9cb9de..b8a7adcc09 100644 --- a/faucet/src/faucet.rs +++ b/faucet/src/faucet.rs @@ -173,7 +173,7 @@ impl Faucet { /// Checks per-request and per-time-ip limits; if both pass, this method returns a signed /// SystemProgram::Transfer transaction from the faucet keypair to the requested recipient. If /// the request exceeds this per-request limit, this method returns a signed SPL Memo - /// transaction with the memo: "request too large; req: SOL cap: SOL" + /// transaction with the memo: `"request too large; req: SOL cap: SOL"` pub fn build_airdrop_transaction( &mut self, req: FaucetRequest, diff --git a/ledger/src/blockstore_db.rs b/ledger/src/blockstore_db.rs index 67812c8087..261cdcb83e 100644 --- a/ledger/src/blockstore_db.rs +++ b/ledger/src/blockstore_db.rs @@ -229,14 +229,14 @@ pub mod columns { /// The shred data column /// /// index type: (u64, u64) - /// value type: Vec + /// value type: [`Vec`] pub struct ShredData; #[derive(Debug)] /// The shred erasure code column /// /// index type: (u64, u64) - /// value type: Vec + /// value type: [`Vec`] pub struct ShredCode; #[derive(Debug)] diff --git a/remote-wallet/src/remote_wallet.rs b/remote-wallet/src/remote_wallet.rs index 89894c4c95..97f7692987 100644 --- a/remote-wallet/src/remote_wallet.rs +++ b/remote-wallet/src/remote_wallet.rs @@ -228,7 +228,8 @@ pub trait RemoteWallet { unimplemented!(); } - /// Sign transaction data with wallet managing pubkey at derivation path m/44'/501'/'/'. + /// Sign transaction data with wallet managing pubkey at derivation path + /// `m/44'/501'/'/'`. fn sign_message( &self, derivation_path: &DerivationPath, @@ -237,7 +238,8 @@ pub trait RemoteWallet { unimplemented!(); } - /// Sign off-chain message with wallet managing pubkey at derivation path m/44'/501'/'/'. + /// Sign off-chain message with wallet managing pubkey at derivation path + /// `m/44'/501'/'/'`. fn sign_offchain_message( &self, derivation_path: &DerivationPath, diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 897314688b..a3e5877815 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -1,5 +1,5 @@ -//! Persistent accounts are stored in below path location: -//! //data/ +//! Persistent accounts are stored at this path location: +//! `//data/` //! //! The persistent store would allow for this mode of operation: //! - Concurrent single thread append with many concurrent readers. @@ -12,8 +12,8 @@ //! The only required in memory data structure with a write lock is the index, //! which should be fast to update. //! -//! AppendVec's only store accounts for single slots. To bootstrap the -//! index from a persistent store of AppendVec's, the entries include +//! [`AppendVec`]'s only store accounts for single slots. To bootstrap the +//! index from a persistent store of [`AppendVec`]'s, the entries include //! a "write_version". A single global atomic `AccountsDb::write_version` //! tracks the number of commits to the entire data store. So the latest //! commit for each slot entry would be indexed. diff --git a/runtime/src/sorted_storages.rs b/runtime/src/sorted_storages.rs index 927624431f..40017e6a3a 100644 --- a/runtime/src/sorted_storages.rs +++ b/runtime/src/sorted_storages.rs @@ -29,7 +29,7 @@ impl<'a> SortedStorages<'a> { } } - /// primary method of retrieving (Slot, Arc) + /// primary method of retrieving [`(Slot, Arc)`] pub fn iter_range(&'a self, range: &R) -> SortedStoragesIter<'a> where R: RangeBounds, @@ -70,9 +70,9 @@ impl<'a> SortedStorages<'a> { Self::new_with_slots(source.iter().zip(slots.into_iter()), None, None) } - /// create `SortedStorages` from 'source' iterator. - /// 'source' contains a Arc and its associated slot - /// 'source' does not have to be sorted in any way, but is assumed to not have duplicate slot #s + /// create [`SortedStorages`] from `source` iterator. + /// `source` contains a [`Arc`] and its associated slot + /// `source` does not have to be sorted in any way, but is assumed to not have duplicate slot #s pub fn new_with_slots( source: impl Iterator, Slot)> + Clone, // A slot used as a lower bound, but potentially smaller than the smallest slot in the given 'source' iterator diff --git a/runtime/src/stakes.rs b/runtime/src/stakes.rs index 0fc78f4bf9..ca3d06fb53 100644 --- a/runtime/src/stakes.rs +++ b/runtime/src/stakes.rs @@ -159,9 +159,9 @@ impl StakesCache { } /// The generic type T is either Delegation or StakeAccount. -/// Stake is equivalent to the old code and is used for backward -/// compatibility in BankFieldsToDeserialize. -/// But banks cache Stakes which includes the entire stake +/// [`Stakes`] is equivalent to the old code and is used for backward +/// compatibility in [`crate::bank::BankFieldsToDeserialize`]. +/// But banks cache [`Stakes`] which includes the entire stake /// account and StakeState deserialized from the account. Doing so, will remove /// the need to load the stake account from accounts-db when working with /// stake-delegations. diff --git a/sdk/src/signer/keypair.rs b/sdk/src/signer/keypair.rs index b3087f9d56..9d1155f417 100644 --- a/sdk/src/signer/keypair.rs +++ b/sdk/src/signer/keypair.rs @@ -70,7 +70,7 @@ impl Keypair { /// Note that the `Clone` trait is intentionally unimplemented because making a /// second copy of sensitive secret keys in memory is usually a bad idea. /// - /// Only use this in tests or when strictly required. Consider using Arc + /// Only use this in tests or when strictly required. Consider using [`std::sync::Arc`] /// instead. pub fn insecure_clone(&self) -> Self { Self(ed25519_dalek::Keypair { diff --git a/sdk/src/transaction_context.rs b/sdk/src/transaction_context.rs index 892f96b2ea..bf91b2a74c 100644 --- a/sdk/src/transaction_context.rs +++ b/sdk/src/transaction_context.rs @@ -790,7 +790,7 @@ impl<'a> BorrowedAccount<'a> { /// Call this when you have an owned buffer and want to replace the account /// data with it. /// - /// If you have a slice, use set_data_from_slice(). + /// If you have a slice, use [`Self::set_data_from_slice()`]. #[cfg(not(target_os = "solana"))] pub fn set_data(&mut self, data: Vec) -> Result<(), InstructionError> { self.can_data_be_resized(data.len())?; @@ -807,7 +807,7 @@ impl<'a> BorrowedAccount<'a> { /// Call this when you have a slice of data you do not own and want to /// replace the account data with it. /// - /// If you have an owned buffer (eg Vec), use set_data(). + /// If you have an owned buffer (eg [`Vec`]), use [`Self::set_data()`]. #[cfg(not(target_os = "solana"))] pub fn set_data_from_slice(&mut self, data: &[u8]) -> Result<(), InstructionError> { self.can_data_be_resized(data.len())?;