From 7792dc990143d8d36d9afbdf1609d72cb6d9f009 Mon Sep 17 00:00:00 2001 From: Dmytrol <46675332+Dimitrolito@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:28:51 +0200 Subject: [PATCH] Fix typos in various Rust and TypeScript files (#12643) **What does this pull request do? Explain your changes.** This pull request addresses several typographical errors in various files within the repository. The following files were updated: - `futures.rs` (in `core/async/src/test_loop/`) - `metrics.rs` (in `core/o11y/src/`) - `types.rs` (in `core/primitives-core/src/`) - `zero_balance_account.rs` (in `integration-tests/src/tests/client/features/`) - `runner.rs` (in `runtime/near-vm-runner/src/`) **Specific updates:** - Fixed the usage of incorrect articles such as changing "a event-loop-based" to "an event-loop-based." - Corrected other minor typographical issues across different files. **How did you test each of these updates?** The changes were tested by reviewing the files for correctness, ensuring that the typographical issues were addressed without affecting the functionality of the code. No additional tests were run since these are purely textual corrections. **Does this pull request close any open issues?** **Checklist:** - [ ] Read the [contribution guide](./CONTRIBUTING.md) - [ ] `make` runs successfully - [ ] All tests in `./test.sh` pass - [ ] README and other documentation updated - [ ] [Pending changelog](./CHANGELOG_PENDING.md) updated --------- Co-authored-by: Aleksandr Logunov --- core/async/src/test_loop/futures.rs | 2 +- core/o11y/src/metrics.rs | 2 +- core/primitives-core/src/types.rs | 2 +- .../src/tests/client/features/zero_balance_account.rs | 2 +- runtime/near-vm-runner/src/runner.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/async/src/test_loop/futures.rs b/core/async/src/test_loop/futures.rs index d9abadca3d6..b7ce7e2176e 100644 --- a/core/async/src/test_loop/futures.rs +++ b/core/async/src/test_loop/futures.rs @@ -6,7 +6,7 @@ //! To support this, pass test_loop.future_spawner() the &dyn FutureSpawner //! to any component that needs to spawn futures. //! -//! This causes any futures spawned during the test to end up as an callback in the +//! This causes any futures spawned during the test to end up as a callback in the //! test loop. The event will eventually be executed by the drive_futures function, //! which will drive the future until it is either suspended or completed. If suspended, //! then the waker of the future (called when the future is ready to resume) will place diff --git a/core/o11y/src/metrics.rs b/core/o11y/src/metrics.rs index f514d852335..ab26e059b74 100644 --- a/core/o11y/src/metrics.rs +++ b/core/o11y/src/metrics.rs @@ -8,7 +8,7 @@ //! `observe()` method to record durations (e.g., block processing time). //! - `IncCounter`: used to represent an ideally ever-growing, never-shrinking //! integer (e.g., number of block processing requests). -//! - `IntGauge`: used to represent an varying integer (e.g., number of +//! - `IntGauge`: used to represent a varying integer (e.g., number of //! attestations per block). //! //! ## Important diff --git a/core/primitives-core/src/types.rs b/core/primitives-core/src/types.rs index 5c7c673c456..2321afa5e32 100644 --- a/core/primitives-core/src/types.rs +++ b/core/primitives-core/src/types.rs @@ -54,7 +54,7 @@ pub type ProtocolVersion = u32; /// used instead. pub type ShardIndex = usize; -/// The shard identifier. It may be a arbitrary number - it does not need to be +/// The shard identifier. It may be an arbitrary number - it does not need to be /// a number in the range 0..NUM_SHARDS. The shard ids do not need to be /// sequential or contiguous. /// diff --git a/integration-tests/src/tests/client/features/zero_balance_account.rs b/integration-tests/src/tests/client/features/zero_balance_account.rs index f1499a60477..5bb1d146eba 100644 --- a/integration-tests/src/tests/client/features/zero_balance_account.rs +++ b/integration-tests/src/tests/client/features/zero_balance_account.rs @@ -339,7 +339,7 @@ fn test_storage_usage_components() { let config = config_store.get_config(PROTOCOL_VERSION); let account_overhead = config.fees.storage_usage_config.num_bytes_account as usize; let record_overhead = config.fees.storage_usage_config.num_extra_bytes_record as usize; - // The NEP proposes to fit 4 full access keys + 2 fn access keys in an zero balance account + // The NEP proposes to fit 4 full access keys + 2 fn access keys in a zero balance account let full_access = PUBLIC_KEY_STORAGE_USAGE + FULL_ACCESS_PERMISSION_STORAGE_USAGE + record_overhead; let fn_access = diff --git a/runtime/near-vm-runner/src/runner.rs b/runtime/near-vm-runner/src/runner.rs index b7be0586997..f8a178cae50 100644 --- a/runtime/near-vm-runner/src/runner.rs +++ b/runtime/near-vm-runner/src/runner.rs @@ -13,7 +13,7 @@ use std::sync::Arc; /// is to crash or maybe ban a peer and/or send a challenge. /// /// A `VMOutcome` is a graceful completion of a VM execution. It can also contain -/// an guest error message in the `aborted` field. But these are not errors in +/// a guest error message in the `aborted` field. But these are not errors in /// the real sense, those are just reasons why execution failed at some point. /// Such as when a smart contract code panics. /// Note that the fact that `VMOutcome` contains is tracked on the blockchain.