Skip to content

Commit

Permalink
Fix typos in comments and documentation across multiple files (#20676)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Dimitrolito and stefan-mysten authored Jan 7, 2025
1 parent 3dfcf5a commit 2e256a7
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions crates/sui-aws-orchestrator/src/ssh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-benchmark/src/benchmark_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/sui-bridge/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-core/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-core/src/unit_tests/congestion_control_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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! {
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion external-crates/move/crates/move-analyzer/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -700,5 +700,5 @@ public fun vector::singleton<Element>(
e: Element
): vector<Element>

Return an vector of size one containing element `e`.
Return a vector of size one containing element `e`.

2 changes: 1 addition & 1 deletion external-crates/move/crates/move-stdlib/docs/vector.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Aborts if <code>i</code> or <code>j</code> is out of bounds.

## Function `singleton`

Return an vector of size one containing element <code>e</code>.
Return a vector of size one containing element <code>e</code>.


<pre><code><b>public</b> <b>fun</b> <a href="vector.md#0x1_vector_singleton">singleton</a>&lt;Element&gt;(e: Element): <a href="vector.md#0x1_vector">vector</a>&lt;Element&gt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module std::vector {
/// Aborts if `i` or `j` is out of bounds.
public native fun swap<Element>(v: &mut vector<Element>, 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<Element>(e: Element): vector<Element> {
let mut v = empty();
v.push_back(e);
Expand Down
2 changes: 1 addition & 1 deletion sdk/docs/pages/typescript/migrations/sui-1.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2e256a7

Please sign in to comment.