Skip to content

Commit

Permalink
Refactor with clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
lemolatoon committed Nov 11, 2023
1 parent 577030d commit bab900d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
5 changes: 2 additions & 3 deletions kernel/src/lifegame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ extern crate alloc;
use core::sync::atomic::AtomicBool;

use alloc::collections::VecDeque;
use alloc::sync::Arc;
use alloc::vec::Vec;
use kernel_lib::futures::yield_pending;
use kernel_lib::layer::{LayerManager, Position, Window};
use kernel_lib::layer::{Position, Window};
use kernel_lib::mutex::Mutex;
use kernel_lib::render::{RendererMut, Vector2D};
use kernel_lib::Color;

use crate::graphics::{get_pixcel_writer, LAYER_MANGER};
use crate::graphics::LAYER_MANGER;

pub static CLICKED_POSITION_QUEUE: Mutex<VecDeque<(usize, usize)>> = Mutex::new(VecDeque::new());

Expand Down
7 changes: 2 additions & 5 deletions kernel/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
use core::{arch::asm, panic::PanicInfo};

pub extern crate alloc;
use alloc::sync::Arc;
use common::types::KernelMainArg;
use core::fmt::Write;
use kernel::{
alloc::alloc::GlobalAllocator,
graphics::{init_graphics, init_logger, LAYER_MANGER},
graphics::{init_graphics, init_logger},
interrupts::init_idt,
memory::MemoryMapper,
multitasking::{
Expand All @@ -23,9 +22,7 @@ use kernel::{
},
xhci::init_xhci_controller,
};
use kernel_lib::{
layer::LayerManager, mutex::Mutex, render::Vector2D, shapes::mouse::MOUSE_CURSOR_SHAPE, Color,
};
use kernel_lib::{render::Vector2D, shapes::mouse::MOUSE_CURSOR_SHAPE, Color};

#[no_mangle]
extern "C" fn kernel_main(arg: *const KernelMainArg) -> ! {
Expand Down
3 changes: 1 addition & 2 deletions kernel/src/xhci.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
extern crate alloc;
use core::ffi::c_void;

use alloc::sync::Arc;
use kernel_lib::{futures::yield_pending, layer::LayerManager, mutex::Mutex};
use kernel_lib::futures::yield_pending;

use crate::{
alloc::alloc::GlobalAllocator, interrupts::InterruptVector, memory::MemoryMapper, pci,
Expand Down

0 comments on commit bab900d

Please sign in to comment.