Skip to content

Commit

Permalink
style: use first() instead of get(0)
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu committed Dec 31, 2023
1 parent 5db7e50 commit 6d88461
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use tracing::warn;

pub fn check_pinned_consistency(a: &Assignments) {
for s in a.all_students() {
if let Some(p) = a.rankings(s).get(0) {
if let Some(p) = a.rankings(s).first() {
if a.is_pinned_for(s, *p) && a.project_for(s) != Some(*p) {
warn!(
student = %a.student(s),
Expand Down

0 comments on commit 6d88461

Please sign in to comment.