Format manually
Some checks failed
Continuous Integration / ci (push) Failing after 4m10s
Format code / Format the kernel (push) Successful in 1m11s

This commit is contained in:
Arthur Beck 2025-03-31 16:39:51 -05:00
parent 6d3c77056c
commit 80bd36b4c4
Signed by: ArthurB
GPG key ID: CA200B389F0F6BC9
6 changed files with 21 additions and 13 deletions

View file

@ -179,13 +179,21 @@ extern "C" fn _start() -> ! {
// rawmemorymap's sections into a pointer to those sections.
for ele in &mut *memorysections {
(*ele) = core::mem::transmute::<aphrodite::boot::MemoryMapping, aphrodite::multiboot2::MemorySection>(Into::<MemoryMapping>::into(*ele))
(*ele) = core::mem::transmute::<
aphrodite::boot::MemoryMapping,
aphrodite::multiboot2::MemorySection,
>(
Into::<MemoryMapping>::into(*ele)
)
}
MM = MemoryMap {
version: (*rawmemorymap).entry_version,
entry_size: (*rawmemorymap).entry_size,
sections: core::mem::transmute::<&mut [aphrodite::multiboot2::MemorySection], &[aphrodite::boot::MemoryMapping]>(memorysections),
sections: core::mem::transmute::<
&mut [aphrodite::multiboot2::MemorySection],
&[aphrodite::boot::MemoryMapping],
>(memorysections),
};
let mm2 = aphrodite::boot::MemoryMap {
len: MM.sections.len() as u64,

View file

@ -99,9 +99,7 @@ impl dyn TextDisplay + '_ {
pub struct NoneTextDisplay {}
impl TextDisplay for NoneTextDisplay {
fn get_size(&self) -> Result<(u32, u32), crate::Error<'static>> {
Ok((1,1))
}
fn get_size(&self) -> Result<(u32, u32), crate::Error<'static>> { Ok((1, 1)) }
fn write_char(&self, _: (u32, u32), _: u8, _: Color) -> Result<(), crate::Error<'static>> {
Ok(())
}

View file

@ -7,7 +7,6 @@
#![deny(rustdoc::invalid_html_tags)]
#![deny(rustdoc::invalid_rust_codeblocks)]
#![deny(unsafe_op_in_unsafe_fn)]
#![feature(ptr_metadata)]
#![feature(const_trait_impl)]
#![feature(f128)]

View file

@ -1,4 +1,5 @@
use crate::{display::TextDisplay, output::*};
use crate::display::TextDisplay;
use crate::output::*;
use core::alloc::{Allocator, Layout};

View file

@ -2,6 +2,4 @@ use crate::display::TextDisplay;
mod memmapalloc;
pub fn run(display: &dyn TextDisplay) {
memmapalloc::run(display);
}
pub fn run(display: &dyn TextDisplay) { memmapalloc::run(display); }

View file

@ -114,7 +114,9 @@ pub fn parse_pc_screen_font(data: RawPCScreenFont) -> Result<PCScreenFont, crate
flags: data.flags,
height: data.height,
width: data.width,
glyphs: Vec::from(core::mem::transmute::<&[u8], &[Glyph]>(data.glyphs.as_slice())),
glyphs: Vec::from(core::mem::transmute::<&[u8], &[Glyph]>(
data.glyphs.as_slice(),
)),
unitable: Some(unitable),
};
return Ok(out);
@ -125,7 +127,9 @@ pub fn parse_pc_screen_font(data: RawPCScreenFont) -> Result<PCScreenFont, crate
flags: data.flags,
height: data.height,
width: data.width,
glyphs: Vec::from(core::mem::transmute::<&[u8], &[Glyph]>(data.glyphs.as_slice())),
glyphs: Vec::from(core::mem::transmute::<&[u8], &[Glyph]>(
data.glyphs.as_slice(),
)),
unitable: None,
};
Ok(out)