Skip to content

Commit bec58aa

Browse files
authored
Allow rust enumerations to be ordered (#1030)
Currently enumerations in the generated rust bindings are not ordered, and can only be compared by equality. This patch adds the `PartialOrd` and `Ord` derives to generated enums.
1 parent b01ec5e commit bec58aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/rust/src/interface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1560,7 +1560,7 @@ macro_rules! {macro_name} {{
15601560
.cloned()
15611561
.collect();
15621562
derives.extend(
1563-
["Clone", "Copy", "PartialEq", "Eq"]
1563+
["Clone", "Copy", "PartialEq", "Eq", "PartialOrd", "Ord"]
15641564
.into_iter()
15651565
.map(|s| s.to_string()),
15661566
);

0 commit comments

Comments
 (0)