mirror of
https://github.com/openharmony/third_party_rust_rust-smallvec.git
synced 2026-07-21 01:55:25 -04:00
Silence warnings about deprecated LayoutErr
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user