Skip to content

Commit 8cb7c57

Browse files
authored
chore: fix typos (#7358)
## Description Corrected misspellings: - `more then` → `more than`
1 parent 8be2dae commit 8cb7c57

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

sway-core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ pub(crate) fn attr_decls_to_attributes(
272272
if attributes_of_kind.len() > 1 {
273273
let (last_attribute, previous_attributes) = attributes_of_kind
274274
.split_last()
275-
.expect("`attributes_of_kind` has more then one element");
275+
.expect("`attributes_of_kind` has more than one element");
276276
handler.emit_err(
277277
ConvertParseTreeError::InvalidAttributeMultiplicity {
278278
last_occurrence: (&last_attribute.name).into(),

sway-core/src/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::{collections::HashMap, path::PathBuf, sync::Arc};
1818
1919
#[derive(Default)]
2020
pub(crate) struct MetadataManager {
21-
// We want to be able to store more then one `Span` per `MetadataIndex`.
21+
// We want to be able to store more than one `Span` per `MetadataIndex`.
2222
// E.g., storing the span of the function name, and the whole function declaration.
2323
// The spans differ then by the tag property of their `Metadatum::Struct`.
2424
// We could cache all such spans in a single `HashMap` where the key would be `(Span, tag)`.

sway-core/src/semantic_analysis/ast_node/expression/match_expression/typed/matcher.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ pub(super) enum ReqDeclNode {
111111
/// E.g., a literal `123` will have a requirement on the scrutinee e.g. `struct.x == 123`.
112112
ReqOrVarDecl(ReqOrVarDecl),
113113
/// Represent the requirements and declarations connected with the lazy AND operator,
114-
/// if there are more then two of them.
114+
/// if there are more than two of them.
115115
/// Notice that the vector of contained nodes can be empty or have only one element.
116116
/// AND semantics is applied if there are two or more elements.
117117
/// E.g., requirements coming from the struct and tuple patterns
118118
/// must all be fulfilled in order for the whole pattern to match.
119119
And(Vec<ReqDeclNode>),
120120
/// Represent the requirements and declarations connected with the lazy OR operator,
121-
/// if there are more then two of them.
121+
/// if there are more than two of them.
122122
/// Notice that the vector of contained nodes can be empty or have only one element.
123123
/// OR semantics is applied if there are two or more elements.
124124
/// Only the requirements coming from the individual variants of an OR match arm

sway-core/src/semantic_analysis/ast_node/expression/match_expression/typed/typed_match_branch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ fn instantiate_branch_condition_result_var_declarations_and_matched_or_variant_i
412412
// return the calculated condition and no carry overs.
413413
// `vars` and `tuples` will be empty after appending.
414414

415-
// Note that if we have more then one tuple in carry over, this means they
415+
// Note that if we have more than one tuple in carry over, this means they
416416
// are coming from an AND node (because an OR node always produces a single tuple).
417417
// In that case the `vars` redefined in tuples are never the same and we can
418418
// safely declare them in any order after the tuples.

sway-core/src/semantic_analysis/ast_node/expression/typed_expression.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ impl ty::TyExpression {
959959
&arms_reachability[..catch_all_arm_position],
960960
);
961961
}
962-
// if there are no interior catch-all arms and there is more then one arm
962+
// if there are no interior catch-all arms and there is more than one arm
963963
else if let Some((last_arm_report, other_arms_reachability)) =
964964
arms_reachability.split_last()
965965
{

sway-core/src/semantic_analysis/module.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ fn check_is_valid_error_type_enum(
710710
{
711711
let (last_occurrence, previous_occurrences) = duplicated_error_messages
712712
.split_last()
713-
.expect("`duplicated_error_messages` has more then one element");
713+
.expect("`duplicated_error_messages` has more than one element");
714714
handler.emit_warn(CompileWarning {
715715
span: last_occurrence.clone(),
716716
warning_content: Warning::ErrorDuplicatedErrorMessage {

sway-ir/src/analysis/memory_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ pub fn get_gep_symbol(context: &Context, val: Value) -> Option<Symbol> {
360360
}
361361

362362
/// Return [Symbol] referred by `val` if there is _exactly one_ symbol referred,
363-
/// or `None` if there are no [Symbol]s referred or if there is more then one
363+
/// or `None` if there are no [Symbol]s referred or if there is more than one
364364
/// referred.
365365
pub fn get_referred_symbol(context: &Context, val: Value) -> Option<Symbol> {
366366
let syms = get_referred_symbols(context, val);

0 commit comments

Comments
 (0)