From ec51531fb8efda9b75316111c040dd756f815b0c Mon Sep 17 00:00:00 2001 From: Danilo Krummrich Date: Wed, 13 May 2026 21:09:16 +0200 Subject: rust: alloc: cleanup doctest imports to "kernel vertical" style Change all imports in the alloc module's doctests to use the "kernel vertical" import style [1]. While at it, drop imports that are automatically included in doctests. Link: https://docs.kernel.org/rust/coding-guidelines.html#imports [1] Reviewed-by: Eliot Courtney Link: https://patch.msgid.link/20260513190946.619810-2-dakr@kernel.org Signed-off-by: Danilo Krummrich --- rust/kernel/alloc/allocator.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'rust/kernel/alloc/allocator.rs') diff --git a/rust/kernel/alloc/allocator.rs b/rust/kernel/alloc/allocator.rs index af20332d59f7..562e41925ada 100644 --- a/rust/kernel/alloc/allocator.rs +++ b/rust/kernel/alloc/allocator.rs @@ -174,8 +174,11 @@ impl Vmalloc { /// # Examples /// /// ``` - /// # use core::ptr::{NonNull, from_mut}; - /// # use kernel::{page, prelude::*}; + /// # use core::ptr::{ + /// # from_mut, + /// # NonNull, // + /// # }; + /// # use kernel::page; /// use kernel::alloc::allocator::Vmalloc; /// /// let mut vbox = VBox::<[u8; page::PAGE_SIZE]>::new_uninit(GFP_KERNEL)?; -- cgit v1.2.3