tor-linkspec: impl AsRef<str> for PtTransportName

This commit is contained in:
Ian Jackson 2023-07-20 18:49:28 +01:00
parent f64997e1e1
commit e3d5f25750
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1 @@
ADDED: impl AsRef<str> for PtTransportName

View File

@ -92,6 +92,12 @@ impl Display for PtTransportName {
}
}
impl AsRef<str> for PtTransportName {
fn as_ref(&self) -> &str {
&self.0
}
}
/// These identifiers are used to indicate the built-in transport.
///
/// When outputting string representations, the first (`"-"`) is used.