diff --git a/Cargo.toml b/Cargo.toml index 71cdb39..489f9c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "byte_lamination" -version = "0.1.1" +version = "0.1.2" edition = "2021" authors = ["Olivier 'reivilibre'"] repository = "https://git.emunest.net/reivilibre/byte_lamination.git" diff --git a/src/compression/zstd.rs b/src/compression/zstd.rs index 435ee2f..21f7fad 100644 --- a/src/compression/zstd.rs +++ b/src/compression/zstd.rs @@ -32,7 +32,7 @@ impl<'a, T> ByteLamination<'a> for Zstd<'a, T> { } fn into_bytes(self) -> Vec { - todo!() + self.bytes.into_owned() } fn try_from_bytes(bytes: Cow<'a, [u8]>) -> Result> { diff --git a/src/raw.rs b/src/raw.rs index 6c9e223..905e02c 100644 --- a/src/raw.rs +++ b/src/raw.rs @@ -8,7 +8,7 @@ impl<'a> ByteLamination<'a> for Cow<'a, [u8]> { } fn into_bytes(self) -> Vec { - todo!() + self.into_owned() } fn try_from_bytes(bytes: Cow<'a, [u8]>) -> Result> { @@ -22,7 +22,7 @@ impl<'a> ByteLamination<'a> for Vec { } fn into_bytes(self) -> Vec { - todo!() + self } fn try_from_bytes(bytes: Cow<'a, [u8]>) -> Result> { @@ -36,7 +36,7 @@ impl<'a> ByteLamination<'a> for String { } fn into_bytes(self) -> Vec { - todo!() + self.into_bytes() } fn try_from_bytes(bytes: Cow<'a, [u8]>) -> Result> { @@ -53,7 +53,7 @@ impl<'a> ByteLamination<'a> for Cow<'a, str> { } fn into_bytes(self) -> Vec { - todo!() + self.into_owned().into_bytes() } fn try_from_bytes(bytes: Cow<'a, [u8]>) -> Result> { diff --git a/src/serialisation/bare.rs b/src/serialisation/bare.rs index 7d51868..e7d6ce5 100644 --- a/src/serialisation/bare.rs +++ b/src/serialisation/bare.rs @@ -33,7 +33,7 @@ impl<'a, T> ByteLamination<'a> for SerdeBare<'a, T> { } fn into_bytes(self) -> Vec { - todo!() + self.bytes.into_owned() } fn try_from_bytes(bytes: Cow<'a, [u8]>) -> Result> { diff --git a/src/serialisation/cbor.rs b/src/serialisation/cbor.rs index afef89b..a28637e 100644 --- a/src/serialisation/cbor.rs +++ b/src/serialisation/cbor.rs @@ -33,7 +33,7 @@ impl<'a, T> ByteLamination<'a> for SerdeCbor<'a, T> { } fn into_bytes(self) -> Vec { - todo!() + self.bytes.into_owned() } fn try_from_bytes(bytes: Cow<'a, [u8]>) -> Result> {