Skip to content

Commit

Permalink
Auto merge of #246 - mbrubeck:warnings, r=jdm
Browse files Browse the repository at this point in the history
Silence warnings about deprecated LayoutErr

This is renamed to LayoutError in Rust 1.51 and later, but we need to continue using the old name to support older versions of Rust.
  • Loading branch information
bors-servo committed Dec 30, 2020
2 parents e4c73e4 + d00f4d4 commit f5f1a22
Showing 1 changed file with 2 additions and 0 deletions.
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 f5f1a22

Please sign in to comment.