Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
wgyt authored and stefan-mysten committed Jan 3, 2025
1 parent 50c085a commit 75af4e6
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion crates/sui-benchmark/src/workloads/adversarial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub enum AdversarialPayloadType {
LargePureFunctionArgs,
// Creates a bunch of shared objects in the module init for adversarial, then taking them all as input)
MaxReads,
// Creates a the largest package publish possible
// Creates the largest package publish possible
MaxPackagePublish,
// TODO:
// - MaxReads (by creating a bunch of shared objects in the module init for adversarial, then taking them all as input)
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-core/src/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4360,7 +4360,7 @@ impl AuthorityState {
/// Returns UserInputError::ObjectNotFound if no lock records for the given object can be found.
/// Returns UserInputError::ObjectVersionUnavailableForConsumption if the object record is at a different version.
/// Returns Some(VerifiedEnvelope) if the given ObjectRef is locked by a certain transaction.
/// Returns None if the a lock record is initialized for the given ObjectRef but not yet locked by any transaction,
/// Returns None if a lock record is initialized for the given ObjectRef but not yet locked by any transaction,
/// or cannot find the transaction in transaction table, because of data race etc.
#[instrument(level = "trace", skip_all)]
pub async fn get_transaction_lock(
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-core/src/traffic_controller/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ impl TrafficSim {
// until ttl is expired.
println!("Num blocked requests: {}", metrics.num_blocked);
// This metric on the other hand reflects the number of times a client was added to the blocklist
// and thus can be compared an the expectation based on the policy block threshold and ttl
// and thus can be compared with the expectation based on the policy block threshold and ttl
println!(
"Num times added to blocklist: {}",
metrics.num_blocklist_adds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
// 1. A splits off a coin from its gas and sends it to B.
//
// 2. A sponsors a transaction where B splits off the a coin from the gas coin
// 2. A sponsors a transaction where B splits off a coin from the gas coin
// and sends it to C.
//
// 3. (A splits off a coin to use as gas in future transactions where the gas
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-indexer/src/indexer_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ impl IndexerReader {

/// Retrieve the system state data for the given epoch. If no epoch is given,
/// it will retrieve the latest epoch's data and return the system state.
/// System state of the an epoch is written at the end of the epoch, so system state
/// System state of the epoch is written at the end of the epoch, so system state
/// of the current epoch is empty until the epoch ends. You can call
/// `get_latest_sui_system_state` for current epoch instead.
pub async fn get_epoch_sui_system_state(
Expand Down
2 changes: 1 addition & 1 deletion crates/typed-store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub type StoreError = typed_store_error::TypedStoreError;
/// The definer of the struct can specify the default options for each table using annotations
/// We can also supply column family options on the default ones
/// A user defined function of signature () -> Options can be provided for each table
/// If a an override function is not specified, the default in `typed_store::rocks::default_db_options` is used
/// If an override function is not specified, the default in `typed_store::rocks::default_db_options` is used
/// ```
/// use typed_store::rocks::DBOptions;
/// use typed_store::rocks::DBMap;
Expand Down
2 changes: 1 addition & 1 deletion docs/content/guides/developer/sui-101/simulating-refs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module a_module {
}
```

The function `use_asset` takes an immutable reference to the asset (`&Asset`), which is a common pattern in a an API definition.
The function `use_asset` takes an immutable reference to the asset (`&Asset`), which is a common pattern in an API definition.

Now consider another module that uses this asset.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/references/cli/move.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ This command currently only works on debug builds of the CLI. Please build the
This example uses [`first_package`](https://github.com/MystenLabs/sui/tree/main/examples/move/first_package) Move package.
To get the a summary of the test coverage, you must first run the `sui move test --coverage` command, and then the `sui move coverage summary --test` to get a summary of the test coverage in the example project.
To get a summary of the test coverage, you must first run the `sui move test --coverage` command, and then the `sui move coverage summary --test` to get a summary of the test coverage in the example project.
```shell
$ sui move test --coverage
Expand Down
2 changes: 1 addition & 1 deletion external-crates/move/crates/move-analyzer/src/symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,7 @@ fn run_typing_analysis(
computation_data
}

// Given use-defs for a the main program or dependencies, update the per-file
// Given use-defs for the main program or dependencies, update the per-file
// use-def map
fn update_file_use_defs(
computation_data: &SymbolsComputationData,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Test abort on an a native function when stepping out
// Test abort on a native function when stepping out
// of a function containing the native call (before this
// call is stepped into or over).
module abort_native::m;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Test abort on an a native function when stepping out
// Test abort on a native function when stepping out
// of a function containing the native call (before this
// call is stepped into or over).
module abort_native::m;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ impl FunctionDefinition {
self.code.is_none()
}

// Deprecated public bit, deprecated in favor a the Visibility enum
// Deprecated public bit, deprecated in favor of the Visibility enum
pub const DEPRECATED_PUBLIC_BIT: u8 = 0b01;

/// A native function implemented in Rust.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const _: () = {
assert!(BinaryFlavor::mask_and_shift_to_unflavor(x) == BinaryFlavor::SUI_FLAVOR);
};

/// Encoding of a the flavor into the version of the binary format for versions >= 7.
/// Encoding of the flavor into the version of the binary format for versions >= 7.
pub struct BinaryFlavor;
impl BinaryFlavor {
pub const FLAVOR_MASK: u32 = 0xFF00_0000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ pub enum LocalState<V: Clone + Debug + Default> {
},
}

/// A trait for a the context when visiting a `Command` in a block. At a minimum it must hold the diagnostics
/// A trait for the context when visiting a `Command` in a block. At a minimum it must hold the diagnostics
/// and the abstract state
pub trait SimpleExecutionContext {
/// Add a diagnostic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub enum Severity {
Bug = 4,
}

/// A an optional prefix to distinguish between different types of warnings (internal vs. possibly
/// An optional prefix to distinguish between different types of warnings (internal vs. possibly
/// multiple externally provided ones).
pub type ExternalPrefix = Option<&'static str>;
/// The ID for a diagnostic, consisting of an optional prefix, a category, and a code.
Expand Down
2 changes: 1 addition & 1 deletion external-crates/move/crates/move-core-types/src/u256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ impl U256 {
Some(Self(self.0.shr(rhs)))
}

/// Downcast to a an unsigned value of type T
/// Downcast to an unsigned value of type T
/// T must be at most u128
pub fn down_cast_lossy<T: std::convert::TryFrom<u128>>(self) -> T {
// Size of this type
Expand Down
2 changes: 1 addition & 1 deletion external-crates/move/crates/move-model/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ impl GlobalEnv {
.expect("file_id undefined")
}

/// Maps a an index which was obtained by `file_id_to_idx` back to a FileId.
/// Maps an index which was obtained by `file_id_to_idx` back to a FileId.
pub fn file_idx_to_id(&self, file_idx: u16) -> FileId {
*self
.file_idx_to_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ impl<'a> BytecodeGenerator<'a> {
None
}

/// Given an `AbstractState`, `state`, and a the number of locals the function has,
/// Given an `AbstractState`, `state`, and the number of locals the function has,
/// this function returns a list of instructions whose preconditions are satisfied for
/// the state.
fn candidate_instructions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ mod checked {
Ok(InputValue::new_object(object_metadata, obj_value))
}

/// Load an a CallArg, either an object or a raw set of BCS bytes
/// Load a CallArg, either an object or a raw set of BCS bytes
fn load_call_arg(
protocol_config: &ProtocolConfig,
vm: &MoveVM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ mod checked {
Ok(InputValue::new_object(object_metadata, obj_value))
}

/// Load an a CallArg, either an object or a raw set of BCS bytes
/// Load a CallArg, either an object or a raw set of BCS bytes
fn load_call_arg<'vm, 'state>(
vm: &'vm MoveVM,
state_view: &'state dyn ExecutionState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,7 @@ mod checked {
Ok(InputValue::new_object(object_metadata, obj_value))
}

/// Load an a CallArg, either an object or a raw set of BCS bytes
/// Load a CallArg, either an object or a raw set of BCS bytes
fn load_call_arg(
protocol_config: &ProtocolConfig,
vm: &MoveVM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ mod checked {
Ok(InputValue::new_object(object_metadata, obj_value))
}

/// Load an a CallArg, either an object or a raw set of BCS bytes
/// Load a CallArg, either an object or a raw set of BCS bytes
fn load_call_arg(
protocol_config: &ProtocolConfig,
vm: &MoveVM,
Expand Down

0 comments on commit 75af4e6

Please sign in to comment.