From 2e256a70aa0ff81972ded6ebd57f7679e2ea194d Mon Sep 17 00:00:00 2001 From: Dmytrol <46675332+Dimitrolito@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:38:40 +0200 Subject: [PATCH] Fix typos in comments and documentation across multiple files (#20676) This pull request addresses typographical errors in comments and documentation in several files across the codebase. These changes improve the readability and professionalism of the project without affecting functionality. ### Key Changes: 1. **Comments:** - Corrected "a address" to "an address" in multiple locations. - Fixed incorrect usages such as "a HTTP" -> "an HTTP" and "a owned object" -> "an owned object." - Fixed redundant words like "preventing preventing" in comments. 2. **Documentation:** - Updated "an vector" to "a vector" in the Move documentation. - Clarified phrasing to improve overall comprehension. --- **Test Plan:** No functionality was changed, so testing was limited to confirming no compilation or linting issues in affected files. --- **Release Notes:** - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API: **Impact:** No user-facing changes beyond improved documentation clarity. --------- Co-authored-by: stefan-mysten <135084671+stefan-mysten@users.noreply.github.com> --- crates/sui-aws-orchestrator/src/ssh.rs | 4 ++-- crates/sui-benchmark/src/benchmark_setup.rs | 2 +- crates/sui-bridge/src/error.rs | 2 +- crates/sui-core/src/metrics.rs | 2 +- crates/sui-core/src/unit_tests/congestion_control_tests.rs | 4 ++-- external-crates/move/crates/move-analyzer/src/utils.rs | 2 +- external-crates/move/crates/move-analyzer/tests/symbols.exp | 2 +- external-crates/move/crates/move-stdlib/docs/vector.md | 2 +- external-crates/move/crates/move-stdlib/sources/vector.move | 2 +- sdk/docs/pages/typescript/migrations/sui-1.0.mdx | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/crates/sui-aws-orchestrator/src/ssh.rs b/crates/sui-aws-orchestrator/src/ssh.rs index 093b6d3fbbe83..54433e755425b 100644 --- a/crates/sui-aws-orchestrator/src/ssh.rs +++ b/crates/sui-aws-orchestrator/src/ssh.rs @@ -24,7 +24,7 @@ use crate::{ }; #[derive(PartialEq, Eq)] -/// The status of a ssh command running in the background. +/// The status of an ssh command running in the background. pub enum CommandStatus { Running, Terminated, @@ -346,7 +346,7 @@ impl SshConnection { } } - /// Execute a ssh command on the remote machine. + /// Execute an ssh command on the remote machine. pub async fn execute(&self, command: String) -> SshResult<(String, String)> { let mut error = None; for _ in 0..self.retries + 1 { diff --git a/crates/sui-benchmark/src/benchmark_setup.rs b/crates/sui-benchmark/src/benchmark_setup.rs index 86338e7232a4d..df3f089c52e14 100644 --- a/crates/sui-benchmark/src/benchmark_setup.rs +++ b/crates/sui-benchmark/src/benchmark_setup.rs @@ -28,7 +28,7 @@ use tracing::info; pub enum Env { // Mode where benchmark in run on a validator cluster that gets spun up locally Local, - // Mode where benchmark is run on a already running remote cluster + // Mode where benchmark is run on an already running remote cluster Remote, } diff --git a/crates/sui-bridge/src/error.rs b/crates/sui-bridge/src/error.rs index e0d151e1bfefe..c540050517158 100644 --- a/crates/sui-bridge/src/error.rs +++ b/crates/sui-bridge/src/error.rs @@ -53,7 +53,7 @@ pub enum BridgeError { MismatchedAction, // Action is not a governance action ActionIsNotGovernanceAction(BridgeAction), - // Client requested an non-approved governace action + // Client requested a non-approved governace action GovernanceActionIsNotApproved, // Authority has invalid url AuthoirtyUrlInvalid, diff --git a/crates/sui-core/src/metrics.rs b/crates/sui-core/src/metrics.rs index d9093e32b9ae3..9c93383f9028d 100644 --- a/crates/sui-core/src/metrics.rs +++ b/crates/sui-core/src/metrics.rs @@ -72,7 +72,7 @@ pub struct RateTracker { window_duration: Duration, total_bins: usize, - // We use the event time and the tracker start time to calculate the bin that a event + // We use the event time and the tracker start time to calculate the bin that an event // belongs to. // event_global_bin_index = (event_time - start_time) / BIN_DURATION. // event_index_in_buffer = event_global_bin_index % buffer_size. diff --git a/crates/sui-core/src/unit_tests/congestion_control_tests.rs b/crates/sui-core/src/unit_tests/congestion_control_tests.rs index c14cc7bee7fd8..44882a7938350 100644 --- a/crates/sui-core/src/unit_tests/congestion_control_tests.rs +++ b/crates/sui-core/src/unit_tests/congestion_control_tests.rs @@ -129,7 +129,7 @@ impl TestSetup { create_shared_object_effects.created()[0].0 } - // Creates a owned object in `setup_authority_state` and returns the object reference. + // Creates an owned object in `setup_authority_state` and returns the object reference. async fn create_owned_object(&self) -> ObjectRef { let mut builder = ProgrammableTransactionBuilder::new(); move_call! { @@ -307,7 +307,7 @@ async fn test_congestion_control_execution_cancellation() { )) }); - // Runs a transaction that touches shared_object_1, shared_object_2 and a owned object. + // Runs a transaction that touches shared_object_1, shared_object_2 and an owned object. let (congested_tx, effects) = update_objects( &authority_state, &test_setup.package, diff --git a/external-crates/move/crates/move-analyzer/src/utils.rs b/external-crates/move/crates/move-analyzer/src/utils.rs index 9aba0a1ee21be..4edca67fe8578 100644 --- a/external-crates/move/crates/move-analyzer/src/utils.rs +++ b/external-crates/move/crates/move-analyzer/src/utils.rs @@ -59,7 +59,7 @@ pub fn lsp_position_to_loc( /// Some functions defined in a module need to be ignored. pub fn ignored_function(name: Symbol) -> bool { // In test mode (that's how IDE compiles Move source files), - // the compiler inserts an dummy function preventing preventing + // the compiler inserts a dummy function preventing preventing // publishing of modules compiled in test mode. We need to // ignore its definition to avoid spurious on-hover display // of this function's info whe hovering close to `module` keyword. diff --git a/external-crates/move/crates/move-analyzer/tests/symbols.exp b/external-crates/move/crates/move-analyzer/tests/symbols.exp index 9ba63a796dff1..b908ae5ed5584 100644 --- a/external-crates/move/crates/move-analyzer/tests/symbols.exp +++ b/external-crates/move/crates/move-analyzer/tests/symbols.exp @@ -700,5 +700,5 @@ public fun vector::singleton( e: Element ): vector - Return an vector of size one containing element `e`. + Return a vector of size one containing element `e`. diff --git a/external-crates/move/crates/move-stdlib/docs/vector.md b/external-crates/move/crates/move-stdlib/docs/vector.md index 1e13e7dc46eaf..cbd2545efe731 100644 --- a/external-crates/move/crates/move-stdlib/docs/vector.md +++ b/external-crates/move/crates/move-stdlib/docs/vector.md @@ -239,7 +239,7 @@ Aborts if i or j is out of bounds. ## Function `singleton` -Return an vector of size one containing element e. +Return a vector of size one containing element e.
public fun singleton<Element>(e: Element): vector<Element>
diff --git a/external-crates/move/crates/move-stdlib/sources/vector.move b/external-crates/move/crates/move-stdlib/sources/vector.move
index 55c1abac34b74..743d102583775 100644
--- a/external-crates/move/crates/move-stdlib/sources/vector.move
+++ b/external-crates/move/crates/move-stdlib/sources/vector.move
@@ -61,7 +61,7 @@ module std::vector {
     /// Aborts if `i` or `j` is out of bounds.
     public native fun swap(v: &mut vector, i: u64, j: u64);
 
-    /// Return an vector of size one containing element `e`.
+    /// Return a vector of size one containing element `e`.
     public fun singleton(e: Element): vector {
         let mut v = empty();
         v.push_back(e);
diff --git a/sdk/docs/pages/typescript/migrations/sui-1.0.mdx b/sdk/docs/pages/typescript/migrations/sui-1.0.mdx
index 16266053d952e..d7926c5fda65a 100644
--- a/sdk/docs/pages/typescript/migrations/sui-1.0.mdx
+++ b/sdk/docs/pages/typescript/migrations/sui-1.0.mdx
@@ -246,7 +246,7 @@ from the documentation when BCS was re-written last year, and is now being remov
 
 The registry was dependent on side-effects to register type definitions, and had no way to enforce
 type-safety. The new BCS API works much better in bundlers, and provides great type-safety when
-parsing an serializing BCS data.
+parsing a serializing BCS data.
 
 ## Size limits