Sitelet https://github.com/starkware-libs/cairo/commit/45f931db3cf67fd3dca63389fe066cd94d8a446a
Skip to content

Commit 45f931d

Browse files
authored
Updated toml rust version. (#10049)
1 parent 835db85 commit 45f931d

5 files changed

Lines changed: 18 additions & 19 deletions

File tree

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ edition = "2024"
9494
license = "Apache-2.0"
9595
license-file = "LICENSE"
9696
repository = "https://github.com/starkware-libs/cairo/"
97-
rust-version = "1.86"
97+
rust-version = "1.94"
9898
version = "2.18.0"
9999

100100
[workspace.dependencies]

‎crates/cairo-lang-sierra-generator/src/function_generator.rs‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,11 @@ fn get_function_ap_change_and_code<'db>(
8383

8484
// If the function starts with `revoke_ap_tracking` then we can avoid
8585
// the first `disable_ap_tracking`.
86-
if let Some(lowering::Statement::Call(call_stmt)) = root_block.statements.first() {
87-
if get_concrete_libfunc_id(db, call_stmt.function, false).1
86+
if let Some(lowering::Statement::Call(call_stmt)) = root_block.statements.first()
87+
&& get_concrete_libfunc_id(db, call_stmt.function, false).1
8888
== revoke_ap_tracking_libfunc_id(db)
89-
{
90-
context.set_ap_tracking(false);
91-
}
89+
{
90+
context.set_ap_tracking(false);
9291
}
9392

9493
// Generate a label for the function's body.

‎crates/cairo-lang-sierra-generator/src/program_generator.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,10 +443,10 @@ pub fn get_dummy_program_for_size_estimation(
443443
let mut functions = vec![function];
444444

445445
for statement in &function.body {
446-
if let Some(function_id) = try_get_function_with_body_id(db, statement) {
447-
if processed_function_ids.insert(function_id) {
448-
functions.push(db.priv_get_dummy_function(function_id)?);
449-
}
446+
if let Some(function_id) = try_get_function_with_body_id(db, statement)
447+
&& processed_function_ids.insert(function_id)
448+
{
449+
functions.push(db.priv_get_dummy_function(function_id)?);
450450
}
451451
}
452452
// Since we are not interested in the locations, we can remove them from the statements.

‎crates/cairo-lang-sierra-generator/src/store_variables/mod.rs‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -455,10 +455,11 @@ impl<'db> AddStoreVariableStatements<'db> {
455455
fn store_all_possibly_lost_variables(&mut self, state: &mut VariablesState) {
456456
self.store_variables_as_locals(state);
457457
for (var, var_state) in state.variables.iter_mut() {
458-
if let VarState::Deferred { info } = var_state {
459-
if info.kind != DeferredOutputKind::Const && self.duplicated_vars.contains(var) {
460-
*var_state = self.store_deferred(&mut state.known_stack, var, &info.ty);
461-
}
458+
if let VarState::Deferred { info } = var_state
459+
&& info.kind != DeferredOutputKind::Const
460+
&& self.duplicated_vars.contains(var)
461+
{
462+
*var_state = self.store_deferred(&mut state.known_stack, var, &info.ty);
462463
}
463464
}
464465
}

‎tests/e2e_test.rs‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,11 @@ fn run_e2e_test(
387387

388388
// Handle test_data if specified.
389389
// This runs AFTER sierra/casm generation, so compilation outputs are always verified first.
390-
if let Some(test_data) = params.test_data {
391-
if let Err(e) =
390+
if let Some(test_data) = params.test_data
391+
&& let Err(e) =
392392
run_and_validate_test_data(sierra_program, test_data, params.add_withdraw_gas)
393-
{
394-
return TestRunnerResult { outputs: res, error: Some(e) };
395-
}
393+
{
394+
return TestRunnerResult { outputs: res, error: Some(e) };
396395
}
397396

398397
TestRunnerResult::success(res)

0 commit comments

Comments
 (0)