Skip to content

Commit 2aa3b2f

Browse files
Remove Ord bounds on types
They belong on the methods, a lá `HashMap`.
1 parent 5455139 commit 2aa3b2f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/relation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ use crate::{
1111
/// A relation represents a fixed set of key-value pairs. In many places in a
1212
/// Datalog computation we want to be sure that certain relations are not able
1313
/// to vary (for example, in antijoins).
14-
#[derive(Clone)]
15-
pub struct Relation<Tuple: Ord> {
14+
#[derive(Clone, Debug, PartialEq, Eq)]
15+
pub struct Relation<Tuple> {
1616
/// Sorted list of distinct tuples.
1717
pub elements: Vec<Tuple>,
1818
}

src/variable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub(crate) trait VariableTrait {
3636
/// of performance. Such a variable cannot be relied on to terminate iterative computation,
3737
/// and it is important that any cycle of derivations have at least one de-duplicating
3838
/// variable on it.
39-
pub struct Variable<Tuple: Ord> {
39+
pub struct Variable<Tuple> {
4040
/// Should the variable be maintained distinctly.
4141
pub(crate) distinct: bool,
4242
/// A useful name for the variable.
@@ -251,7 +251,7 @@ impl<Tuple: Ord> Variable<Tuple> {
251251
}
252252
}
253253

254-
impl<Tuple: Ord> Clone for Variable<Tuple> {
254+
impl<Tuple> Clone for Variable<Tuple> {
255255
fn clone(&self) -> Self {
256256
Variable {
257257
distinct: self.distinct,

0 commit comments

Comments
 (0)