From 45207fb8ba1284742fc49684604e948fc16f56b5 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sun, 21 Apr 2024 21:26:17 +0200 Subject: [PATCH] removing the import of legacy numeric constants --- src/arch/aarch64/kernel/pci.rs | 2 +- src/arch/aarch64/mm/paging.rs | 2 +- src/arch/riscv64/mm/paging.rs | 2 +- src/arch/x86_64/kernel/apic.rs | 2 +- src/arch/x86_64/kernel/pci.rs | 2 -- src/arch/x86_64/kernel/processor.rs | 2 +- src/drivers/virtio/transport/mmio.rs | 2 +- src/fs/fuse.rs | 2 +- src/syscalls/tasks.rs | 1 - 9 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/arch/aarch64/kernel/pci.rs b/src/arch/aarch64/kernel/pci.rs index 7031c8f770..f6e246f487 100644 --- a/src/arch/aarch64/kernel/pci.rs +++ b/src/arch/aarch64/kernel/pci.rs @@ -1,5 +1,5 @@ use alloc::vec::Vec; -use core::{str, u32, u64, u8}; +use core::str; use arm_gic::gicv3::{IntId, Trigger}; use bit_field::BitField; diff --git a/src/arch/aarch64/mm/paging.rs b/src/arch/aarch64/mm/paging.rs index 7201a00707..eb3c4268f1 100644 --- a/src/arch/aarch64/mm/paging.rs +++ b/src/arch/aarch64/mm/paging.rs @@ -2,7 +2,7 @@ use core::arch::asm; use core::marker::PhantomData; -use core::{fmt, mem, ptr, usize}; +use core::{fmt, mem, ptr}; use align_address::Align; diff --git a/src/arch/riscv64/mm/paging.rs b/src/arch/riscv64/mm/paging.rs index 4eeaa29bdc..97e73b1514 100644 --- a/src/arch/riscv64/mm/paging.rs +++ b/src/arch/riscv64/mm/paging.rs @@ -1,5 +1,5 @@ use core::marker::PhantomData; -use core::{ptr, usize}; +use core::ptr; use align_address::Align; use hermit_sync::SpinMutex; diff --git a/src/arch/x86_64/kernel/apic.rs b/src/arch/x86_64/kernel/apic.rs index 4771f1ff3c..b3996cd415 100644 --- a/src/arch/x86_64/kernel/apic.rs +++ b/src/arch/x86_64/kernel/apic.rs @@ -5,7 +5,7 @@ use core::arch::x86_64::_mm_mfence; use core::fmt; use core::hint::spin_loop; use core::sync::atomic::Ordering; -use core::{cmp, mem, ptr, u32}; +use core::{cmp, mem, ptr}; use align_address::Align; #[cfg(feature = "smp")] diff --git a/src/arch/x86_64/kernel/pci.rs b/src/arch/x86_64/kernel/pci.rs index e48e838853..d585ed784e 100644 --- a/src/arch/x86_64/kernel/pci.rs +++ b/src/arch/x86_64/kernel/pci.rs @@ -1,5 +1,3 @@ -use core::{u32, u8}; - use pci_types::{ConfigRegionAccess, PciAddress, PciHeader}; use x86::io::*; diff --git a/src/arch/x86_64/kernel/processor.rs b/src/arch/x86_64/kernel/processor.rs index bde2af3131..522f333bbb 100644 --- a/src/arch/x86_64/kernel/processor.rs +++ b/src/arch/x86_64/kernel/processor.rs @@ -7,7 +7,7 @@ use core::arch::x86_64::{ use core::hint::spin_loop; use core::num::NonZeroU32; use core::sync::atomic::{AtomicU64, Ordering}; -use core::{fmt, ptr, u32}; +use core::{fmt, ptr}; use hermit_entry::boot_info::PlatformInfo; use hermit_sync::Lazy; diff --git a/src/drivers/virtio/transport/mmio.rs b/src/drivers/virtio/transport/mmio.rs index a99fce483c..e3508b5dde 100644 --- a/src/drivers/virtio/transport/mmio.rs +++ b/src/drivers/virtio/transport/mmio.rs @@ -5,7 +5,7 @@ use core::ptr::{read_volatile, write_volatile}; use core::sync::atomic::{fence, Ordering}; -use core::{ptr, u8}; +use core::ptr; #[cfg(any(feature = "tcp", feature = "udp"))] use crate::arch::kernel::interrupts::*; diff --git a/src/fs/fuse.rs b/src/fs/fuse.rs index d23fb6365f..f98ec173e3 100644 --- a/src/fs/fuse.rs +++ b/src/fs/fuse.rs @@ -5,10 +5,10 @@ use alloc::string::String; use alloc::sync::Arc; use alloc::vec::Vec; use core::ffi::CStr; +use core::future; use core::mem::MaybeUninit; use core::sync::atomic::{AtomicU64, Ordering}; use core::task::Poll; -use core::{future, u32, u8}; use async_lock::Mutex; use async_trait::async_trait; diff --git a/src/syscalls/tasks.rs b/src/syscalls/tasks.rs index 20a859dad7..dfb3548f0c 100644 --- a/src/syscalls/tasks.rs +++ b/src/syscalls/tasks.rs @@ -1,5 +1,4 @@ use alloc::collections::BTreeMap; -use core::isize; #[cfg(feature = "newlib")] use core::sync::atomic::{AtomicUsize, Ordering};