Skip to content

Commit

Permalink
[repo] Fix lints after upgrading to Rust 1.75 (#1171)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamChou19815 authored Jan 1, 2024
1 parent e727c8b commit cc1e0cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/samlang-heap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ impl ModuleReference {
}

pub fn is_std(&self, heap: &Heap) -> bool {
self.get_parts(heap).get(0) == Some(&PStr::STD)
self.get_parts(heap).first() == Some(&PStr::STD)
}

pub fn pretty_print(&self, heap: &Heap) -> String {
Expand Down
2 changes: 1 addition & 1 deletion crates/samlang-optimization/src/loop_induction_analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ fn extract_loop_guard_structure(
non_loop_invariant_variables: &HashSet<PStr>,
) -> Option<LoopGuardStructure> {
let (first_binary_stmt, second_single_if_stmt) =
(stmts.get(0).and_then(Statement::as_binary), stmts.get(1).and_then(Statement::as_single_if));
(stmts.first().and_then(Statement::as_binary), stmts.get(1).and_then(Statement::as_single_if));
match (first_binary_stmt, second_single_if_stmt) {
(
Some(Binary { name, operator, e1: Expression::Variable(e1_var), e2 }),
Expand Down

0 comments on commit cc1e0cc

Please sign in to comment.