diff --git a/crates/tor-hsservice/src/nickname.rs b/crates/tor-hsservice/src/nickname.rs index 3dd78754f..ed9c452a8 100644 --- a/crates/tor-hsservice/src/nickname.rs +++ b/crates/tor-hsservice/src/nickname.rs @@ -18,9 +18,9 @@ use tor_keymgr::ArtiPathComponent; /// (but punctuation is not allowed at the start or end). /// /// (These are the same rules as [`tor_keymgr::ArtiPathComponent`] -#[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)] -#[derive(Display, From, Into)] -#[derive(Serialize, Deserialize)] +#[derive( + Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd, Display, From, Into, Serialize, Deserialize, +)] #[serde(try_from = "String", into = "String")] pub struct HsNickname(ArtiPathComponent); diff --git a/crates/tor-keymgr/src/key_specifier.rs b/crates/tor-keymgr/src/key_specifier.rs index 5c49df575..a1e2e800b 100644 --- a/crates/tor-keymgr/src/key_specifier.rs +++ b/crates/tor-keymgr/src/key_specifier.rs @@ -48,10 +48,20 @@ impl ArtiPath { // // TODO HSS: disallow consecutive `.` to prevent path traversal. #[derive( - Clone, Debug, derive_more::Deref, derive_more::DerefMut, derive_more::Into, derive_more::Display, + Clone, + Debug, + derive_more::Deref, + derive_more::DerefMut, + derive_more::Into, + derive_more::Display, + Hash, + Eq, + PartialEq, + Ord, + PartialOrd, + Serialize, + Deserialize, )] -#[derive(Hash, Eq, PartialEq, Ord, PartialOrd)] -#[derive(Serialize, Deserialize)] #[serde(try_from = "String", into = "String")] pub struct ArtiPathComponent(String);