mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-12 08:30:51 +00:00
Remove PartialOrd, Ord implementations from keys
They do not have a clear ordering so we shouldn't expose such
This commit is contained in:
parent
613fade99f
commit
189fc09055
3 changed files with 6 additions and 6 deletions
|
@ -16,7 +16,7 @@ use std::{panic::AssertUnwindSafe, sync::Arc};
|
|||
///
|
||||
/// You can read more about cycle handling in
|
||||
/// the [salsa book](https://https://salsa-rs.github.io/salsa/cycles.html).
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash)]
|
||||
pub struct Cycle {
|
||||
participants: CycleParticipants,
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ use crate::{cycle::CycleRecoveryStrategy, zalsa::IngredientIndex, Database, Id};
|
|||
/// database. Used to track output dependencies between queries. Fully ordered and
|
||||
/// equatable but those orderings are arbitrary, and meant to be used only for
|
||||
/// inserting into maps and the like.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct OutputDependencyIndex {
|
||||
ingredient_index: IngredientIndex,
|
||||
key_index: Id,
|
||||
|
@ -16,7 +16,7 @@ pub struct OutputDependencyIndex {
|
|||
/// database. Used to track input dependencies between queries. Fully ordered and
|
||||
/// equatable but those orderings are arbitrary, and meant to be used only for
|
||||
/// inserting into maps and the like.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct InputDependencyIndex {
|
||||
ingredient_index: IngredientIndex,
|
||||
key_index: Option<Id>,
|
||||
|
@ -116,7 +116,7 @@ impl fmt::Debug for InputDependencyIndex {
|
|||
/// An "active" database key index represents a database key index
|
||||
/// that is actively executing. In that case, the `key_index` cannot be
|
||||
/// None.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct DatabaseKeyIndex {
|
||||
pub(crate) ingredient_index: IngredientIndex,
|
||||
pub(crate) key_index: Id,
|
||||
|
|
|
@ -274,10 +274,10 @@ impl Runtime {
|
|||
// no matter where it started on the stack. Find the minimum
|
||||
// key and rotate it to the front.
|
||||
|
||||
if let Some((_, index, _)) = v
|
||||
if let Some((_, index)) = v
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(idx, key)| (key.ingredient_index.debug_name(db), idx, key))
|
||||
.map(|(idx, key)| (key.ingredient_index.debug_name(db), idx))
|
||||
.min()
|
||||
{
|
||||
v.rotate_left(index);
|
||||
|
|
Loading…
Reference in a new issue