diff --git a/src/scopes.rs b/src/scopes.rs index e7ff960..8af8865 100644 --- a/src/scopes.rs +++ b/src/scopes.rs @@ -264,7 +264,7 @@ impl fmt::Display for Scopes { /// Permission scope of the application. /// [Details on what each permission provides][1] /// [1]: https://github.com/tootsuite/documentation/blob/master/Using-the-API/OAuth-details.md) -#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Hash, Serialize)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize)] enum Scope { /// Read only permissions. #[serde(rename = "read")] @@ -302,6 +302,12 @@ impl FromStr for Scope { } } +impl PartialOrd for Scope { + fn partial_cmp(&self, other: &Scope) -> Option { + Some(self.cmp(other)) + } +} + impl Ord for Scope { fn cmp(&self, other: &Scope) -> Ordering { match (*self, *other) {