Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some typos #4446

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/cairo-lang-filesystem/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub const CORELIB_CRATE_NAME: &str = "core";
/// A configuration per crate.
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
pub struct CrateConfiguration {
/// The root directry of the crate.
/// The root directory of the crate.
pub root: Directory,
/// The cairo edition of the crate.
pub edition: Edition,
Expand Down
2 changes: 1 addition & 1 deletion crates/cairo-lang-formatter/src/node_properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ impl SyntaxNodeFormat for SyntaxNode {

/// For statement lists, returns if we want these as a single line.
fn is_statement_list_break_point_optional(db: &dyn SyntaxGroup, node: &SyntaxNode) -> bool {
// Currently, we only want single line blocks for match arms, with a single statments, with no
// Currently, we only want single line blocks for match arms, with a single statements, with no
// single line comments.
grandparent_kind(db, node) == Some(SyntaxKind::MatchArm)
&& db.get_children(node.clone()).len() == 1
Expand Down
2 changes: 1 addition & 1 deletion crates/cairo-lang-lowering/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ fn concrete_function_with_body_lowered(
optimize_remappings(&mut lowered);
reorder_statements(db, &mut lowered);
reorganize_blocks(&mut lowered);
// Removed blocks may have caused some remappings to be redundent, so they need to be removed,
// Removed blocks may have caused some remappings to be redundant, so they need to be removed,
// as SierraGen drop additions assumes all remappings are of used variables.
optimize_remappings(&mut lowered);
Ok(Arc::new(lowered))
Expand Down
2 changes: 1 addition & 1 deletion crates/cairo-lang-project/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub struct ProjectConfigContent {
/// Additional configurations for all crates.
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct AllCratesConfig {
/// The configuration for non overriden crates.
/// The configuration for non overridden crates.
#[serde(default)]
pub global: SingleCrateConfig,
/// Configuration override per crate.
Expand Down
4 changes: 2 additions & 2 deletions crates/cairo-lang-semantic/src/inline_macros/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fn get_macro_name(with_newline: bool) -> &'static str {
if with_newline { WritelnMacro::NAME } else { WriteMacro::NAME }
}

/// Information about a formating a string for the write macros.
/// Information about a formatting a string for the write macros.
struct FormattingInfo {
/// The syntax rewrite node for the formatter input for the macro.
formatter_arg_node: RewriteNode,
Expand Down Expand Up @@ -288,7 +288,7 @@ impl FormattingInfo {
}

/// Appends a formatted argument to the formatter, flushing the pending bytes if necessary.
/// This includes opening a new match, which is only closed at the end of the macro hanlding.
/// This includes opening a new match, which is only closed at the end of the macro handling.
fn append_formatted_arg(
&self,
builder: &mut PatchBuilder<'_>,
Expand Down
2 changes: 1 addition & 1 deletion crates/cairo-lang-sierra-ap-change/src/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ pub fn calc_ap_changes<TokenUsages: Fn(StatementIdx, CostTokenType) -> usize>(
let mut helper = ApChangeCalcHelper::new(program, token_usages)?;
helper.calc_locals_and_function_ap_changes()?;
let ap_tracked_topological_ordering = helper.tracked_ap_change_topological_order()?;
// Seting tracking info for function entry points.
// Setting tracking info for function entry points.
for f in &program.funcs {
helper.tracking_info.insert(
f.entry_point,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ impl<'a> AddStoreVariableStatements<'a> {
false
}

/// Stores all the deffered and temporary variables as local variables.
/// Stores all the deferred and temporary variables as local variables.
fn store_variables_as_locals(&mut self, state: &mut VariablesState) {
for (var, var_state) in state.variables.iter_mut() {
if let Some(uninitialized_local_var_id) = self.local_variables.get(var) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl VariablesState {
let ty = output_info.ty.clone();
match &arg_states[*param_idx] {
VarState::TempVar { .. } => {
// A partial paramater may be smaller than its parent so it can't replace it
// A partial parameter may be smaller than its parent so it can't replace it
// on the stack.
if matches!(
output_info.ref_info,
Expand Down
2 changes: 1 addition & 1 deletion crates/cairo-lang-sierra-to-casm/src/annotations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ fn test_var_consistency(
return true;
}
// If the variable is not ap-dependent it can always be merged.
// Note: This makes the assumption that empty variables are always mergable.
// Note: This makes the assumption that empty variables are always mergeable.
if actual.expression.can_apply_unknown() {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ See xref:function-calls.adoc[Function calls].
// TODO(yuval): mention methods/self?
// TODO(yuval): mention panics/implicits? (it's part of the signature).
// TODO(yuval): mention inline.
// TODO(yuval): mention local compilability.
// TODO(yuval): mention local compatibility.