From 5cfa303337a10069c6ca9eae70dc622c23acde2e Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Thu, 26 Nov 2020 23:03:35 +0100 Subject: [PATCH] Revert "debug trait" This reverts commit c05c0b837f2d77484b20794958dd77fe76833a8f. --- .../src/collections/smallvec/storage.rs | 2 +- crates/storage/src/lazy/lazy_array.rs | 27 +++++++------------ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/crates/storage/src/collections/smallvec/storage.rs b/crates/storage/src/collections/smallvec/storage.rs index 16b6f280cb6..94817253e76 100644 --- a/crates/storage/src/collections/smallvec/storage.rs +++ b/crates/storage/src/collections/smallvec/storage.rs @@ -52,7 +52,7 @@ const _: () = { impl SpreadLayout for SmallVec where - T: PackedLayout + Debug, + T: PackedLayout, { const FOOTPRINT: u64 = 1 + N as u64; diff --git a/crates/storage/src/lazy/lazy_array.rs b/crates/storage/src/lazy/lazy_array.rs index c96b58763ad..3464300dfa5 100644 --- a/crates/storage/src/lazy/lazy_array.rs +++ b/crates/storage/src/lazy/lazy_array.rs @@ -215,26 +215,17 @@ impl<'a, T> DoubleEndedIterator for EntriesIter<'a, T> { impl<'a, T> ExactSizeIterator for EntriesIter<'a, T> {} -use std::convert::TryInto; -impl EntryArray +impl EntryArray { - //type Bar = CacheCell>>; - /// Creates a new entry array cache. pub fn new() -> Self { Self { - //entries: [(); N].map(|_|Default::default()) - entries: std::iter::repeat_with(|| Default::default()) - .take(N) - //.collect::>>>>().try_into().unwrap() - .collect::>>>>() - //.into() - .try_into().expect("lal") + entries: [(); N].map(|_|Default::default()) } } } -impl Default for EntryArray +impl Default for EntryArray { fn default() -> Self { Self::new() @@ -289,7 +280,7 @@ impl EntryArray } } -impl LazyArray +impl LazyArray where T: PackedLayout, { @@ -319,14 +310,14 @@ where } } -impl Default for LazyArray +impl Default for LazyArray { fn default() -> Self { Self::new() } } -impl LazyArray +impl LazyArray { /// Creates a new empty lazy array. /// @@ -389,7 +380,7 @@ impl LazyArray impl SpreadLayout for LazyArray where - T: PackedLayout + Debug, + T: PackedLayout, { const FOOTPRINT: u64 = N as u64; @@ -416,7 +407,7 @@ where } } -impl LazyArray +impl LazyArray { /// Returns the offset key for the given index if not out of bounds. pub fn key_at(&self, at: Index) -> Option { @@ -427,7 +418,7 @@ impl LazyArray } } -impl LazyArray +impl LazyArray where T: PackedLayout, {