Skip to content

Commit 5d1492d

Browse files
simlecodernbguyseanchen1991
authored
chore: fix grammar in doc comments (informalsystems#1222)
* chore: Remove duplicate words * bunch of grammar fixes --------- Co-authored-by: Ranadeep Biswas <[email protected]> Co-authored-by: Sean Chen <[email protected]>
1 parent 5873500 commit 5d1492d

File tree

67 files changed

+134
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+134
-134
lines changed

ibc-apps/ics20-transfer/src/context.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub trait TokenTransferValidationContext {
2121

2222
/// Validates that the tokens can be escrowed successfully.
2323
///
24-
/// `memo` field allows to incorporate additional contextual details in the
24+
/// `memo` field allows incorporating additional contextual details in the
2525
/// escrow validation.
2626
fn escrow_coins_validate(
2727
&self,
@@ -50,7 +50,7 @@ pub trait TokenTransferValidationContext {
5050

5151
/// Validates the sender account and the coin input before burning.
5252
///
53-
/// `memo` field allows to incorporate additional contextual details in the
53+
/// `memo` field allows incorporating additional contextual details in the
5454
/// burn validation.
5555
fn burn_coins_validate(
5656
&self,
@@ -70,7 +70,7 @@ pub trait TokenTransferValidationContext {
7070
pub trait TokenTransferExecutionContext: TokenTransferValidationContext {
7171
/// Executes the escrow of the tokens in a user account.
7272
///
73-
/// `memo` field allows to incorporate additional contextual details in the
73+
/// `memo` field allows incorporating additional contextual details in the
7474
/// escrow execution.
7575
fn escrow_coins_execute(
7676
&mut self,
@@ -99,7 +99,7 @@ pub trait TokenTransferExecutionContext: TokenTransferValidationContext {
9999

100100
/// Executes burning of the tokens in a user account.
101101
///
102-
/// `memo` field allows to incorporate additional contextual details in the
102+
/// `memo` field allows incorporating additional contextual details in the
103103
/// burn execution.
104104
fn burn_coins_execute(
105105
&mut self,

ibc-apps/ics20-transfer/types/src/denom.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl TracePrefix {
9090
/// it returns a tuple of the removed [`TracePrefix`] and the substring after the prefix.
9191
///
9292
/// If the substring is empty, it returns `None`.
93-
/// Otherwise the substring starts with `/`. In that case,
93+
/// Otherwise, the substring starts with `/`. In that case,
9494
/// the leading `/` is stripped and returned.
9595
///
9696
/// If the string does not start with a [`TracePrefix`], this method returns `None`.
@@ -174,7 +174,7 @@ impl TracePath {
174174
/// [`TracePath`] and the substring after the [`TracePath`].
175175
///
176176
/// If the substring is empty, it returns `None`.
177-
/// Otherwise the substring starts with `/`. In that case,
177+
/// Otherwise, the substring starts with `/`. In that case,
178178
/// the leading `/` is stripped and returned.
179179
///
180180
/// If the string does not contain any [`TracePrefix`], it returns the original string.
@@ -273,7 +273,7 @@ impl PrefixedDenom {
273273
}
274274
}
275275

276-
/// Returns true if the denomination originally came from the sender chain and
276+
/// Returns true if the denomination originally came from the sender chain, and
277277
/// false otherwise.
278278
///
279279
/// Note: It is better to think of the "source" chain as the chain that
@@ -305,7 +305,7 @@ pub fn is_sender_chain_source(
305305
!is_receiver_chain_source(source_port, source_channel, denom)
306306
}
307307

308-
/// Returns true if the denomination originally came from the receiving chain and false otherwise.
308+
/// Returns true if the denomination originally came from the receiving chain, and false otherwise.
309309
pub fn is_receiver_chain_source(
310310
source_port: PortId,
311311
source_channel: ChannelId,

ibc-apps/ics20-transfer/types/src/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub enum TokenTransferError {
4343
MalformedTrace(String),
4444
/// trace length must be even but got: `{len}`
4545
InvalidTraceLength { len: u64 },
46-
/// invalid amount error: `{0}`
46+
/// invalid amount: `{0}`
4747
InvalidAmount(FromDecStrErr),
4848
/// invalid token
4949
InvalidToken,
@@ -75,7 +75,7 @@ pub enum TokenTransferError {
7575
UnknownMsgType { msg_type: String },
7676
/// invalid coin string: `{coin}`
7777
InvalidCoin { coin: String },
78-
/// decoding raw bytes as UTF8 string error: `{0}`
78+
/// decoding raw bytes as UTF-8 string error: `{0}`
7979
Utf8Decode(Utf8Error),
8080
/// other error: `{0}`
8181
Other(String),

ibc-apps/ics20-transfer/types/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ pub const PORT_ID_STR: &str = "transfer";
4646
/// ICS20 application current version.
4747
pub const VERSION: &str = "ics20-1";
4848

49-
/// The successful string used for creating an acknowledgement status,
50-
/// equivalent to `base64::encode(0x01)`.
49+
/// The successful string, used for creating an acknowledgement status.
50+
/// It is equivalent to `base64::encode(0x01)`.
5151
pub const ACK_SUCCESS_B64: &str = "AQ==";
5252

5353
use ibc_core::channel::types::acknowledgement::StatusValue;

ibc-apps/ics721-nft-transfer/src/context.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub trait NftTransferValidationContext {
6767
/// Validates that the tokens can be escrowed successfully.
6868
///
6969
/// The owner of the NFT should be checked in this validation.
70-
/// `memo` field allows to incorporate additional contextual details in the
70+
/// `memo` field allows incorporating additional contextual details in the
7171
/// escrow validation.
7272
fn escrow_nft_validate(
7373
&self,
@@ -109,7 +109,7 @@ pub trait NftTransferValidationContext {
109109
/// Validates the sender account and the coin input before burning.
110110
///
111111
/// The owner of the NFT should be checked in this validation.
112-
/// `memo` field allows to incorporate additional contextual details in the
112+
/// `memo` field allows incorporating additional contextual details in the
113113
/// burn validation.
114114
fn burn_nft_validate(
115115
&self,
@@ -153,7 +153,7 @@ pub trait NftTransferExecutionContext: NftTransferValidationContext {
153153

154154
/// Executes the escrow of the NFT in a user account.
155155
///
156-
/// `memo` field allows to incorporate additional contextual details in the
156+
/// `memo` field allows incorporating additional contextual details in the
157157
/// escrow execution.
158158
fn escrow_nft_execute(
159159
&mut self,
@@ -187,7 +187,7 @@ pub trait NftTransferExecutionContext: NftTransferValidationContext {
187187

188188
/// Executes burning of the NFT in a user account.
189189
///
190-
/// `memo` field allows to incorporate additional contextual details in the
190+
/// `memo` field allows incorporating additional contextual details in the
191191
/// burn execution.
192192
fn burn_nft_execute(
193193
&mut self,

ibc-apps/ics721-nft-transfer/types/src/class.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl PrefixedClassId {
9292
}
9393
}
9494

95-
/// Returns true if the class ID originally came from the sender chain and false otherwise.
95+
/// Returns true if the class ID originally came from the sender chain, and false otherwise.
9696
pub fn is_sender_chain_source(
9797
source_port: PortId,
9898
source_channel: ChannelId,
@@ -101,7 +101,7 @@ pub fn is_sender_chain_source(
101101
!is_receiver_chain_source(source_port, source_channel, class_id)
102102
}
103103

104-
/// Returns true if the class ID originally came from the receiving chain and false otherwise.
104+
/// Returns true if the class ID originally came from the receiving chain, and false otherwise.
105105
pub fn is_receiver_chain_source(
106106
source_port: PortId,
107107
source_channel: ChannelId,

ibc-apps/ics721-nft-transfer/types/src/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub enum NftTransferError {
8686
DecodeRawMsg { reason: String },
8787
/// unknown msg type: `{msg_type}`
8888
UnknownMsgType { msg_type: String },
89-
/// decoding raw bytes as UTF8 string error: `{0}`
89+
/// decoding raw bytes as UTF-8 string error: `{0}`
9090
Utf8Decode(Utf8Error),
9191
/// other error: `{0}`
9292
Other(String),

ibc-apps/ics721-nft-transfer/types/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ pub const PORT_ID_STR: &str = "nft-transfer";
4545
/// ICS-721 application current version.
4646
pub const VERSION: &str = "ics721-1";
4747

48-
/// The successful string used for creating an acknowledgement status,
49-
/// equivalent to `base64::encode(0x01)`.
48+
/// The successful string, used for creating an acknowledgement status.
49+
/// It is equivalent to `base64::encode(0x01)`.
5050
pub const ACK_SUCCESS_B64: &str = "AQ==";
5151

5252
use ibc_core::channel::types::acknowledgement::StatusValue;

ibc-clients/cw-context/src/context/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ use crate::utils::AnyCodec;
2323

2424
type Checksum = Vec<u8>;
2525

26-
/// - [`Height`] can not be used directly as keys in the map,
26+
/// - [`Height`] cannot be used directly as keys in the map,
2727
/// as it doesn't implement some cw_storage specific traits.
2828
/// - Only a sorted set is needed. So the value type is set to
2929
/// [`Empty`] following
3030
/// ([cosmwasm-book](https://book.cosmwasm.com/cross-contract/map-storage.html#maps-as-sets)).
3131
pub const CONSENSUS_STATE_HEIGHT_MAP: Map<'_, (u64, u64), Empty> =
3232
Map::new(ITERATE_CONSENSUS_STATE_PREFIX);
3333

34-
/// Context is a wrapper around the deps and env that gives access to the
35-
/// methods under the ibc-rs Validation and Execution traits.
34+
/// Context is a wrapper around the deps and env that provides access
35+
/// to the methods under the ibc-rs Validation and Execution traits.
3636
pub struct Context<'a, C: ClientType<'a>>
3737
where
3838
<C::ClientState as TryFrom<Any>>::Error: Into<ClientError>,

ibc-clients/cw-context/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//! Contains types and implementations that are needed to integrate a light
2-
//! client, built using ibc-rs, into CosmWasm contract. This crate functions as
2+
//! client, built using ibc-rs, into a CosmWasm contract. This crate functions as
33
//! a library, allowing users to import the ready-made `Context` object that is
44
//! generic across light clients, introduce their concrete client type and
55
//! integrate their assembled context into the CosmWasm contract's entrypoint.
66
//! NOTE: To utilize the CosmWasm contract developed using this library, hosting
7-
//! environments must support CosmWasm module and be using one the versions of
7+
//! environments must support the CosmWasm module and be using one of the versions of
88
//! `ibc-go` that supports the `08-wasm` proxy light client.
99
1010
#![cfg_attr(not(test), deny(clippy::unwrap_used))]

ibc-clients/ics07-tendermint/src/client_state.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub use misbehaviour::*;
2727
pub use update_client::*;
2828
pub use validation::*;
2929

30-
/// Newtype wrapper around the `ClientState` type imported from the
30+
/// Newtype wrapper around the `ClientState` type, imported from the
3131
/// `ibc-client-tendermint-types` crate. This wrapper exists so that we can
3232
/// bypass Rust's orphan rules and implement traits from
3333
/// `ibc::core::client::context` on the `ClientState` type.

ibc-clients/ics07-tendermint/src/client_state/misbehaviour.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use tendermint_light_client_verifier::Verifier;
1616

1717
use crate::types::Header;
1818

19-
/// Determines whether or not two conflicting headers at the same height would
19+
/// Determines if two conflicting headers at the same height would
2020
/// have convinced the light client.
2121
pub fn verify_misbehaviour<V, H>(
2222
ctx: &V,

ibc-clients/ics07-tendermint/src/client_state/validation.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ where
137137
/// 1 - fork:
138138
/// Assumes at least one consensus state before the fork point exists. Let
139139
/// existing consensus states on chain B be: [Sn,.., Sf, Sf-1, S0] with
140-
/// `Sf-1` being the most recent state before fork. Chain A is queried for a
141-
/// header `Hf'` at `Sf.height` and if it is different than the `Hf` in the
140+
/// `Sf-1` being the most recent state before the fork. Chain A is queried for
141+
/// a header `Hf'` at `Sf.height` and if it is different from the `Hf` in the
142142
/// event for the client update (the one that has generated `Sf` on chain),
143143
/// then the two headers are included in the evidence and submitted. Note
144144
/// that in this case the headers are different but have the same height.

ibc-clients/ics07-tendermint/types/src/error.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub enum Error {
5252
MissingUnbondingPeriod,
5353
/// negative max clock drift
5454
NegativeMaxClockDrift,
55-
/// missing latest height
55+
/// missing the latest height
5656
MissingLatestHeight,
5757
/// invalid raw header error: `{0}`
5858
InvalidRawHeader(TendermintError),
@@ -79,7 +79,7 @@ pub enum Error {
7979
VerificationError { detail: Box<LightClientErrorDetail> },
8080
/// Processed time or height for the client `{client_id}` at height `{height}` not found
8181
UpdateMetaDataNotFound { client_id: ClientId, height: Height },
82-
/// The given hash of the validators does not matches the given hash in the signed header. Expected: `{signed_header_validators_hash}`, got: `{validators_hash}`
82+
/// The given hash of the validators does not match the given hash in the signed header. Expected: `{signed_header_validators_hash}`, got: `{validators_hash}`
8383
MismatchValidatorsHashes {
8484
validators_hash: Hash,
8585
signed_header_validators_hash: Hash,
@@ -91,7 +91,7 @@ pub enum Error {
9191
},
9292
/// headers block hashes are equal
9393
MisbehaviourHeadersBlockHashesEqual,
94-
/// headers are not at same height and are monotonically increasing
94+
/// headers are not at the same height and are monotonically increasing
9595
MisbehaviourHeadersNotAtSameHeight,
9696
}
9797

ibc-clients/ics07-tendermint/types/src/trust_threshold.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use tendermint::trust_threshold::TrustThresholdFraction;
1212
/// [`TrustThreshold`] defines the level of trust that a client has
1313
/// towards a set of validators of a chain.
1414
///
15-
/// A trust threshold is represented as a fraction, i.e., a numerator and
15+
/// A trust threshold is represented as a fraction, i.e., a numerator
1616
/// and a denominator.
1717
/// A typical trust threshold is 1/3 in practice.
1818
/// This type accepts even a value of 0, (numerator = 0, denominator = 0),

ibc-core/ics02-client/context/src/client_state.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub trait ClientStateCommon: Convertible<Any> {
2727
/// Type of client associated with this state (eg. Tendermint)
2828
fn client_type(&self) -> ClientType;
2929

30-
/// Latest height the client was updated to
30+
/// The latest height the client was updated to
3131
fn latest_height(&self) -> Height;
3232

3333
/// Validate that the client is at a sufficient height
@@ -36,7 +36,7 @@ pub trait ClientStateCommon: Convertible<Any> {
3636
/// Verify the upgraded client and consensus states and validate proofs
3737
/// against the given root.
3838
///
39-
/// NOTE: proof heights are not included as upgrade to a new revision is
39+
/// NOTE: proof heights are not included, as upgrade to a new revision is
4040
/// expected to pass only on the last height committed by the current
4141
/// revision. Clients are responsible for ensuring that the planned last
4242
/// height of the current revision is somehow encoded in the proof
@@ -205,7 +205,7 @@ where
205205

206206
/// Primary client trait. Defines all the methods that clients must implement.
207207
///
208-
/// `ClientState` is broken up in 3 separate traits to avoid needing to use
208+
/// `ClientState` is broken up into 3 separate traits to avoid needing to use
209209
/// fully qualified syntax for every method call (see ADR 7 for more details).
210210
/// One only needs to implement [`ClientStateCommon`], [`ClientStateValidation`]
211211
/// and [`ClientStateExecution`]; a blanket implementation will automatically

ibc-core/ics02-client/types/src/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub enum ClientError {
9797
Ics23Verification(CommitmentError),
9898
/// misbehaviour handling failed with reason: `{reason}`
9999
MisbehaviourHandlingFailure { reason: String },
100-
/// client specific error: `{description}`
100+
/// client-specific error: `{description}`
101101
ClientSpecific { description: String },
102102
/// client counter overflow error
103103
CounterOverflow,

ibc-core/ics02-client/types/src/height.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ pub enum HeightError {
158158
},
159159
/// attempted to parse an invalid zero height
160160
ZeroHeight,
161-
/// the height(`{raw_height}`) is not valid format, this format must be used: \[revision_number\]-\[revision_height\]
161+
/// the height(`{raw_height}`) is not a valid format, this format must be used: \[revision_number\]-\[revision_height\]
162162
InvalidFormat { raw_height: String },
163163
}
164164

ibc-core/ics02-client/types/src/msgs/misbehaviour.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub const SUBMIT_MISBEHAVIOUR_TYPE_URL: &str = "/ibc.core.client.v1.MsgSubmitMis
2828
pub struct MsgSubmitMisbehaviour {
2929
/// client unique identifier
3030
pub client_id: ClientId,
31-
/// misbehaviour used for freezing the light client
31+
/// misbehaviour, used for freezing the light client
3232
pub misbehaviour: ProtoAny,
3333
/// signer address
3434
pub signer: Signer,

ibc-core/ics02-client/types/src/msgs/update_client.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub const UPDATE_CLIENT_TYPE_URL: &str = "/ibc.core.client.v1.MsgUpdateClient";
1313

1414
/// Represents the message that triggers the update of an on-chain (IBC) client
1515
/// either with new headers, or evidence of misbehaviour.
16-
/// Note that some types of misbehaviour can be detected when a headers
16+
/// Note that some types of misbehaviour can be detected when the headers
1717
/// are updated (`UpdateKind::UpdateClient`).
1818
#[cfg_attr(
1919
feature = "borsh",

ibc-core/ics03-connection/types/src/connection.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ impl State {
488488
}
489489
}
490490

491-
/// Parses the State out from a i32.
491+
/// Parses the State out from an i32.
492492
pub fn from_i32(s: i32) -> Result<Self, ConnectionError> {
493493
match s {
494494
0 => Ok(Self::Uninitialized),
@@ -502,13 +502,13 @@ impl State {
502502
}
503503
}
504504

505-
/// Returns whether or not this connection state is `Open`.
505+
/// Returns if this connection state is `Open`.
506506
pub fn is_open(self) -> bool {
507507
self == State::Open
508508
}
509509

510-
/// Returns whether or not this connection with this state
511-
/// has progressed less or the same than the argument.
510+
/// Returns if this connection with this state
511+
/// has progressed less than or the same as the argument.
512512
///
513513
/// # Example
514514
/// ```rust,ignore

ibc-core/ics03-connection/types/src/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ pub enum ConnectionError {
6969
},
7070
/// invalid client state: `{reason}`
7171
InvalidClientState { reason: String },
72-
/// not enough blocks elapsed, current height `{current_host_height}` is still less than earliest acceptable height `{earliest_valid_height}`
72+
/// not enough blocks elapsed, current height `{current_host_height}` is still less than the earliest acceptable height `{earliest_valid_height}`
7373
NotEnoughBlocksElapsed {
7474
current_host_height: Height,
7575
earliest_valid_height: Height,
7676
},
77-
/// not enough time elapsed, current timestamp `{current_host_time}` is still less than earliest acceptable timestamp `{earliest_valid_time}`
77+
/// not enough time elapsed, current timestamp `{current_host_time}` is still less than the earliest acceptable timestamp `{earliest_valid_time}`
7878
NotEnoughTimeElapsed {
7979
current_host_time: Timestamp,
8080
earliest_valid_time: Timestamp,

ibc-core/ics03-connection/types/src/msgs/conn_open_ack.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ pub const CONN_OPEN_ACK_TYPE_URL: &str = "/ibc.core.connection.v1.MsgConnectionO
2121
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
2222
#[derive(Clone, Debug, PartialEq, Eq)]
2323
pub struct MsgConnectionOpenAck {
24-
/// ConnectionId that chain A has chosen for it's ConnectionEnd
24+
/// ConnectionId that chain A has chosen for its ConnectionEnd
2525
pub conn_id_on_a: ConnectionId,
26-
/// ConnectionId that chain B has chosen for it's ConnectionEnd
26+
/// ConnectionId that chain B has chosen for its ConnectionEnd
2727
pub conn_id_on_b: ConnectionId,
2828
/// ClientState of client tracking chain A on chain B
2929
pub client_state_of_a_on_b: Any,

ibc-core/ics03-connection/types/src/msgs/conn_open_confirm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub const CONN_OPEN_CONFIRM_TYPE_URL: &str = "/ibc.core.connection.v1.MsgConnect
1919
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
2020
#[derive(Clone, Debug, PartialEq, Eq)]
2121
pub struct MsgConnectionOpenConfirm {
22-
/// ConnectionId that chain B has chosen for it's ConnectionEnd
22+
/// ConnectionId that chain B has chosen for its ConnectionEnd
2323
pub conn_id_on_b: ConnectionId,
2424
/// proof of ConnectionEnd stored on Chain A during ConnOpenInit
2525
pub proof_conn_end_on_a: CommitmentProofBytes,

0 commit comments

Comments
 (0)