Skip to content

Commit

Permalink
Merge pull request #71 from fibonacci1729/add-ord
Browse files Browse the repository at this point in the history
Make Label and PackageRef Ord and PartialOrd Again
  • Loading branch information
lann authored Jul 12, 2024
2 parents 9ba1112 + 4df747a commit 4c0ba9f
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 4c0ba9f

Please sign in to comment.