fixed new compiler warnings

This commit was merged in pull request #120.
This commit is contained in:
2021-01-15 17:55:58 +08:00
parent 93493397ae
commit 35204d4716
4 changed files with 6 additions and 8 deletions

View File

@@ -3,7 +3,7 @@ use core::{
mem,
slice,
};
use alloc::alloc::{alloc_zeroed, dealloc, Layout, LayoutErr};
use alloc::alloc::{alloc_zeroed, dealloc, Layout, LayoutError};
use super::{
elf::*,
Error,
@@ -27,7 +27,7 @@ pub struct Image {
}
impl Image {
pub fn new(size: usize, align: usize) -> Result<Self, LayoutErr> {
pub fn new(size: usize, align: usize) -> Result<Self, LayoutError> {
let layout = Layout::from_size_align(size, align)?;
let data = unsafe {
let ptr = alloc_zeroed(layout);