Pacify clippy
This commit is contained in:
@@ -4,14 +4,14 @@ use alloc::{Alloc, AllocErr};
|
||||
use std::alloc::Layout;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct BPFAllocator {
|
||||
pub struct BpfAllocator {
|
||||
heap: Vec<u8>,
|
||||
start: u64,
|
||||
len: u64,
|
||||
pos: u64,
|
||||
}
|
||||
|
||||
impl BPFAllocator {
|
||||
impl BpfAllocator {
|
||||
pub fn new(heap: Vec<u8>, virtual_address: u64) -> Self {
|
||||
let len = heap.len() as u64;
|
||||
Self {
|
||||
@@ -23,7 +23,7 @@ impl BPFAllocator {
|
||||
}
|
||||
}
|
||||
|
||||
impl Alloc for BPFAllocator {
|
||||
impl Alloc for BpfAllocator {
|
||||
fn alloc(&mut self, layout: Layout) -> Result<u64, AllocErr> {
|
||||
let bytes_to_align = (self.pos as *const u8).align_offset(layout.align()) as u64;
|
||||
if self
|
||||
|
Reference in New Issue
Block a user