Skip to content

Commit

Permalink
chore(rust): proofreading (#3152)
Browse files Browse the repository at this point in the history
Came across few typos while browsing ./rust.
One of them is an error message displayed to the user, rest are
comments.
Hope I could be of any help.
Have a nice week-end

Co-authored-by: Daniel Savu <23065004+daniel-savu@users.noreply.github.com>
  • Loading branch information
IssouChancla and daniel-savu authored Jan 31, 2024
1 parent 1adce84 commit 3ea5dd7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rust/agents/relayer/src/msg/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ mod test {
.iter()
.zip(msg_retries_to_set.iter())
.for_each(|(pm, expected_retries)| {
// Round up the actuall backoff because it was calculated with an `Instant::now()` that was a fraction of a second ago
// Round up the actual backoff because it was calculated with an `Instant::now()` that was a fraction of a second ago
let expected_backoff = PendingMessage::calculate_msg_backoff(*expected_retries)
.map(|b| b.as_secs_f32().round());
let actual_backoff = pm._next_attempt_after().map(|instant| {
Expand Down
4 changes: 2 additions & 2 deletions rust/chains/hyperlane-cosmos/src/libs/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ impl CosmosAddress {
Ok(CosmosAddress::new(account_id, digest))
}

/// Creates a wrapper arround a cosmrs AccountId from a private key byte array
/// Creates a wrapper around a cosmrs AccountId from a private key byte array
pub fn from_privkey(priv_key: &[u8], prefix: &str) -> ChainResult<Self> {
let pubkey = SigningKey::from_slice(priv_key)
.map_err(Into::<HyperlaneCosmosError>::into)?
.public_key();
Self::from_pubkey(pubkey, prefix)
}

/// Creates a wrapper arround a cosmrs AccountId from a H256 digest
/// Creates a wrapper around a cosmrs AccountId from a H256 digest
///
/// - digest: H256 digest (hex representation of address)
/// - prefix: Bech32 prefix
Expand Down
2 changes: 1 addition & 1 deletion rust/chains/hyperlane-sealevel/src/mailbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl SealevelMailbox {

/// Simulates an instruction, and attempts to deserialize it into a T.
/// If no return data at all was returned, returns Ok(None).
/// If some return data was returned but deserialization was unsuccesful,
/// If some return data was returned but deserialization was unsuccessful,
/// an Err is returned.
pub async fn simulate_instruction<T: BorshDeserialize + BorshSerialize>(
&self,
Expand Down
4 changes: 2 additions & 2 deletions rust/sealevel/client/src/warp_route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl RouterDeployer<TokenConfig> for WarpRouteDeployer {
let domain_id = chain_config.domain_id();

// TODO: consider pulling the setting of defaults into router.rs,
// and possibly have a more distinct connection client abstration.
// and possibly have a more distinct connection client abstraction.

let mailbox = app_config
.router_config()
Expand Down Expand Up @@ -286,7 +286,7 @@ impl RouterDeployer<TokenConfig> for WarpRouteDeployer {
collateral_info
.spl_token_program
.as_ref()
.expect("Cannot initalize collateral warp route without SPL token program")
.expect("Cannot initialize collateral warp route without SPL token program")
.program_id(),
collateral_info.mint.parse().expect("Invalid mint address"),
)
Expand Down
2 changes: 1 addition & 1 deletion rust/sealevel/libraries/test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async fn initialize_test_ism(

/// Simulates an instruction, and attempts to deserialize it into a T.
/// If no return data at all was returned, returns Ok(None).
/// If some return data was returned but deserialization was unsuccesful,
/// If some return data was returned but deserialization was unsuccessful,
/// an Err is returned.
pub async fn simulate_instruction<T: BorshDeserialize + BorshSerialize>(
banks_client: &mut BanksClient,
Expand Down

0 comments on commit 3ea5dd7

Please sign in to comment.