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(CI): various minor changes for satisfying CI #432

Merged
merged 7 commits into from
Oct 9, 2023
Merged

Conversation

kkafar
Copy link
Collaborator

@kkafar kkafar commented Oct 9, 2023

  • Run cargo fmt
  • Cleanup comparator impl
  • Make some types public instead of pub(self)
  • Disable incorrect clippy lint
  • Apply fixes suggested by clippy

Description

Linked issues

Important implementation details

Copy link
Collaborator Author

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notes for future me

@@ -358,6 +358,7 @@ impl PartialEq for JsspIndividual {
impl Eq for JsspIndividual {}

impl PartialOrd for JsspIndividual {
#[allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lint is useless in our case, as we use PartialOrd impl in Ord impl.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't really do this the other way around

Comment on lines 121 to 132
if a.finish_time < b.finish_time {
Ordering::Less
} else if a.finish_time > b.finish_time {
Ordering::Greater
} else if a.duration != 0 && b.duration != 0 {
a.machine.cmp(&b.machine)
} else if a.duration != 0 && b.duration == 0 {
Ordering::Less
} else {
return Ordering::Greater;
Ordering::Greater
}
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what should happen when:

  1. finish times are equal and both durations are 0
  2. finish times are equal and both durations are not equal and not 0

@kkafar kkafar merged commit 31e393c into main Oct 9, 2023
4 checks passed
@kkafar kkafar deleted the @kkafar/fix-ci branch October 9, 2023 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant