mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-21 00:06:32 +00:00
修复内核的clippy检查报错 (#637)
修复内核的clippy检查报错 --------- Co-authored-by: Samuel Dai <947309196@qq.com> Co-authored-by: Donkey Kane <109840258+xiaolin2004@users.noreply.github.com> Co-authored-by: themildwind <107623059+themildwind@users.noreply.github.com> Co-authored-by: GnoCiYeH <heyicong@dragonos.org> Co-authored-by: MemoryShore <105195940+MemoryShore@users.noreply.github.com> Co-authored-by: 曾俊 <110876916+ZZJJWarth@users.noreply.github.com> Co-authored-by: sun5etop <146408999+sun5etop@users.noreply.github.com> Co-authored-by: hmt <114841534+1037827920@users.noreply.github.com> Co-authored-by: laokengwt <143977175+laokengwt@users.noreply.github.com> Co-authored-by: TTaq <103996388+TTaq@users.noreply.github.com> Co-authored-by: Jomo <2512364506@qq.com> Co-authored-by: Samuel Dai <samuka007@qq.com> Co-authored-by: sspphh <112558065+sspphh@users.noreply.github.com>
This commit is contained in:
@ -17,7 +17,7 @@ impl Slab {
|
||||
pub unsafe fn new(start_addr: usize, slab_size: usize, block_size: usize) -> Slab {
|
||||
let blocks_num = slab_size / block_size;
|
||||
return Slab {
|
||||
block_size: block_size,
|
||||
block_size,
|
||||
free_block_list: FreeBlockList::new(start_addr, block_size, blocks_num),
|
||||
};
|
||||
}
|
||||
@ -106,7 +106,7 @@ impl FreeBlockList {
|
||||
|
||||
impl Drop for FreeBlockList {
|
||||
fn drop(&mut self) {
|
||||
while let Some(_) = self.pop() {}
|
||||
while self.pop().is_some() {}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user