From 5bad9c3fa35d419074fb1e61109c5beb867d120c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Habov=C5=A1tiak?= Date: Fri, 10 Nov 2017 08:43:24 +0100 Subject: [PATCH] Fixed conversions on old versions of the compiler. `From<&'a [T]>` isn't implemented for `Box<[T]>` in older versions of Rust. --- src/database/bytes.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/database/bytes.rs b/src/database/bytes.rs index 60d2117..3894348 100644 --- a/src/database/bytes.rs +++ b/src/database/bytes.rs @@ -93,12 +93,12 @@ impl AsMut<[u8]> for Bytes { impl From for Vec { fn from(bytes: Bytes) -> Self { - bytes.as_ref().into() + bytes.as_ref().to_owned() } } impl From for Box<[u8]> { fn from(bytes: Bytes) -> Self { - bytes.as_ref().into() + bytes.as_ref().to_owned().into_boxed_slice() } }