Silence warnings about deprecated LayoutErr

This commit is contained in:
Matt Brubeck
2020-12-29 20:27:11 -08:00
parent e4c73e4cac
commit d00f4d4736
+2
View File
@@ -86,6 +86,7 @@ extern crate std;
#[cfg(test)]
mod tests;
#[allow(deprecated)]
use alloc::alloc::{Layout, LayoutErr};
use alloc::boxed::Box;
use alloc::{vec, vec::Vec};
@@ -238,6 +239,7 @@ impl fmt::Display for CollectionAllocErr {
}
}
#[allow(deprecated)]
impl From<LayoutErr> for CollectionAllocErr {
fn from(_: LayoutErr) -> Self {
CollectionAllocErr::CapacityOverflow