Skip to content

Commit

Permalink
Silence warnings about deprecated LayoutErr
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed Dec 30, 2020
1 parent e4c73e4 commit d00f4d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -238,6 +239,7 @@ impl fmt::Display for CollectionAllocErr {
}
}

#[allow(deprecated)]
impl From<LayoutErr> for CollectionAllocErr {
fn from(_: LayoutErr) -> Self {
CollectionAllocErr::CapacityOverflow
Expand Down

0 comments on commit d00f4d4

Please sign in to comment.