keymgr: Derive Display for ArtiPath and ArtiPathComponent.

This commit is contained in:
Gabriela Moldovan 2023-06-19 12:50:38 +01:00
parent 89238f25a6
commit 095faf9c5c
1 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,9 @@ use crate::Result;
/// NOTE: There is a 1:1 mapping between a value that implements `KeySpecifier` and its
/// corresponding `ArtiPath`. A `KeySpecifier` can be converted to an `ArtiPath`, but the reverse
/// conversion is not supported.
#[derive(Clone, Debug, derive_more::Deref, derive_more::DerefMut, derive_more::Into)]
#[derive(
Clone, Debug, derive_more::Deref, derive_more::DerefMut, derive_more::Into, derive_more::Display,
)]
pub struct ArtiPath(String);
impl ArtiPath {
@ -26,8 +28,7 @@ impl ArtiPath {
/// A component of an [`ArtiPath`].
///
/// This represents a substring of an [`ArtiPath`] between path separators (`/`).
//
// TODO hs: replace HsClientSpecifier with ArtiPathComponent.
#[derive(Clone, Debug, derive_more::Deref, derive_more::DerefMut, derive_more::Display)]
pub struct ArtiPathComponent(String);
impl ArtiPathComponent {