Skip to content

Commit

Permalink
Make Label and PackageRef Ord and PartialOrd
Browse files Browse the repository at this point in the history
Signed-off-by: Brian H <brian.hardock@fermyon.com>
  • Loading branch information
fibonacci1729 committed Jul 12, 2024
1 parent 9ba1112 commit 4df747a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/wasm-pkg-common/src/label.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use serde::{Deserialize, Serialize};

/// A Component Model kebab-case label.
#[derive(Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Serialize, Deserialize)]
#[serde(into = "String", try_from = "String")]
pub struct Label(String);

Expand Down
2 changes: 1 addition & 1 deletion crates/wasm-pkg-common/src/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub use semver::Version;
/// A package reference, consisting of kebab-case namespace and name.
///
/// Ex: `wasm-pkg:client`
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[derive(Clone, Debug, PartialEq, Eq, Hash, Ord, PartialOrd, Serialize, Deserialize)]
#[serde(into = "String", try_from = "String")]
pub struct PackageRef {
namespace: Label,
Expand Down

0 comments on commit 4df747a

Please sign in to comment.