Skip to content

Commit

Permalink
Derive Ord and PartialOrd for ClassName type
Browse files Browse the repository at this point in the history
This PR adds two simple derives (Ord and PartialOrd) to allow the storage of ClassName type in ordered maps (BTreeSet/BTreeMap etc.).
  • Loading branch information
mivort committed Oct 25, 2024
1 parent 62bceda commit 84581d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion godot-core/src/meta/class_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl ClassNameSource {
/// This struct is very cheap to copy. The actual names are cached globally.
///
/// If you need to create your own class name, use [`new_cached()`][Self::new_cached].
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub struct ClassName {
global_index: u16,
}
Expand Down

0 comments on commit 84581d2

Please sign in to comment.