tor-keymgr, tor-hsservice: Run rustfmt to make derives uglier

This commit is contained in:
Ian Jackson 2023-08-23 15:34:53 +01:00
parent 8596d42372
commit 4cc4734ce2
2 changed files with 16 additions and 6 deletions

View File

@ -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);

View File

@ -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);