summaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
authorAndreas Hindborg <a.hindborg@kernel.org>2025-09-02 11:54:55 +0200
committerJens Axboe <axboe@kernel.dk>2025-09-02 05:23:56 -0600
commitd5d060d624e34c6ce1748a157cf2391e49af2a54 (patch)
treeb9da3d25471567a9d1ae1a05a366e3141b7cf15c /rust/kernel
parent2a0614522885b136e9e650791c794dd49abb5b31 (diff)
rust: str: normalize imports in `str.rs`
Clean up imports in `str.rs`. This makes future code manipulation more manageable. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org> Link: https://lore.kernel.org/r/20250902-rnull-up-v6-16-v7-1-b5212cc89b98@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/kernel')
-rw-r--r--rust/kernel/str.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs
index 6c892550c0ba..082790b7a621 100644
--- a/rust/kernel/str.rs
+++ b/rust/kernel/str.rs
@@ -2,12 +2,13 @@
//! String representations.
-use crate::alloc::{flags::*, AllocError, KVec};
-use crate::fmt::{self, Write};
+use crate::{
+ alloc::{flags::*, AllocError, KVec},
+ fmt::{self, Write},
+ prelude::*,
+};
use core::ops::{self, Deref, DerefMut, Index};
-use crate::prelude::*;
-
/// Byte string without UTF-8 validity guarantee.
#[repr(transparent)]
pub struct BStr([u8]);