diff options
Diffstat (limited to 'src/protocol/common/mod.rs')
-rw-r--r-- | src/protocol/common/mod.rs | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/protocol/common/mod.rs b/src/protocol/common/mod.rs index 50895a2..81c0fd8 100644 --- a/src/protocol/common/mod.rs +++ b/src/protocol/common/mod.rs @@ -1,26 +1,4 @@ pub mod hex; +pub mod lists; +pub mod qxfer; pub mod thread_id; - -/// Lightweight wrapper around `&[u8]` which denotes that the contained data is -/// a ASCII string. -#[derive(Debug)] -#[repr(transparent)] -pub struct Bstr<'a>(&'a [u8]); - -impl<'a> From<&'a [u8]> for Bstr<'a> { - fn from(s: &'a [u8]) -> Bstr<'a> { - Bstr(s) - } -} - -impl<'a> From<Bstr<'a>> for &'a [u8] { - fn from(s: Bstr<'a>) -> &'a [u8] { - s.0 - } -} - -impl AsRef<[u8]> for Bstr<'_> { - fn as_ref(&self) -> &[u8] { - self.0 - } -} |