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 183559d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions benches/bench.rs
@@ -1,6 +1,9 @@
#![feature(test)]
#![allow(deprecated)]

#[cfg(benchmark)]
extern crate foo;

#[macro_use]
extern crate smallvec;
extern crate test;
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
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 183559d

Please sign in to comment.