Merge pull request #250 from arihant2math/fix-clippy-again

Fix clippy again
This commit is contained in:
Matthew Leach
2026-03-07 07:27:06 +00:00
committed by GitHub
5 changed files with 6 additions and 6 deletions

View File

@@ -82,7 +82,7 @@ impl Display for ExceptionState {
global_asm!(include_str!("exceptions.s"));
pub fn default_handler(state: &ExceptionState) {
panic!("Unhandled CPU exception. Program state:\n{}", state);
panic!("Unhandled CPU exception. Program state:\n{state}");
}
#[unsafe(no_mangle)]

View File

@@ -111,9 +111,9 @@ pub fn handle_kernel_mem_fault(exception: Exception, info: AbortIss, state: &mut
if let Some(far) = info.far
&& KERNEL_STACK_AREA.contains_address(VA::from_value(far as _))
{
panic!("Kernel stack overflow detected. Context:\n{}", state);
panic!("Kernel stack overflow detected. Context:\n{state}");
} else {
panic!("Kernel memory fault detected. Context:\n{}", state);
panic!("Kernel memory fault detected. Context:\n{state}");
}
}

View File

@@ -491,7 +491,7 @@ pub fn gic_v3_probe(_dm: &mut DriverManager, d: DeviceDescriptor) -> Result<Arc<
let mut gic = ArmGicV3::new(dist_mem, rdist_mem, rdist_stride)?;
if let Err(e) = gic.init_core(0) {
panic!("Failed to initialize GICv3 for boot core: {:?}", e);
panic!("Failed to initialize GICv3 for boot core: {e:?}");
}
let gic = Arc::new(SpinLock::new(gic));

View File

@@ -80,7 +80,7 @@ unsafe impl Hal for VirtioHal {
// Buffer must be in the direct map for this fast translation.
if vaddr < ArchImpl::PAGE_OFFSET {
panic!("virtio share: buffer VA is not in direct map: {:#x}", vaddr);
panic!("virtio share: buffer VA is not in direct map: {vaddr:#x}");
}
(vaddr - ArchImpl::PAGE_OFFSET) as PhysAddr

View File

@@ -115,7 +115,7 @@ async fn launch_init(mut opts: KOptions) {
VFS.mount_root(&root_fs, initrd_block_dev)
.await
.unwrap_or_else(|e| panic!("Failed to mount root FS: {}", e));
.unwrap_or_else(|e| panic!("Failed to mount root FS: {e}"));
// Process all automounts.
for (path, fs) in opts.automounts.iter() {