Skip to content

Commit 1f1d3e1

Browse files
committed
rust: bitmap: fix formatting
We do our best to keep the repository `rustfmt`-clean, thus run the tool to fix the formatting issue. Link: https://docs.kernel.org/rust/coding-guidelines.html#style-formatting Link: https://rust-for-linux.com/contributing#submit-checklist-addendum Fixes: 0f58788 ("rust: bitmap: clean Rust 1.92.0 `unused_unsafe` warning") Reviewed-by: Burak Emir <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 32f072d commit 1f1d3e1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

rust/kernel/bitmap.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ impl core::ops::Deref for BitmapVec {
167167
let ptr = if self.nbits <= BITS_PER_LONG {
168168
// SAFETY: Bitmap is represented inline.
169169
#[allow(unused_unsafe, reason = "Safe since Rust 1.92.0")]
170-
unsafe { core::ptr::addr_of!(self.repr.bitmap) }
170+
unsafe {
171+
core::ptr::addr_of!(self.repr.bitmap)
172+
}
171173
} else {
172174
// SAFETY: Bitmap is represented as array of `unsigned long`.
173175
unsafe { self.repr.ptr.as_ptr() }
@@ -184,7 +186,9 @@ impl core::ops::DerefMut for BitmapVec {
184186
let ptr = if self.nbits <= BITS_PER_LONG {
185187
// SAFETY: Bitmap is represented inline.
186188
#[allow(unused_unsafe, reason = "Safe since Rust 1.92.0")]
187-
unsafe { core::ptr::addr_of_mut!(self.repr.bitmap) }
189+
unsafe {
190+
core::ptr::addr_of_mut!(self.repr.bitmap)
191+
}
188192
} else {
189193
// SAFETY: Bitmap is represented as array of `unsigned long`.
190194
unsafe { self.repr.ptr.as_ptr() }

0 commit comments

Comments
 (0)