Commit 1f1d3e1d authored by Miguel Ojeda's avatar Miguel Ojeda
Browse files

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: 0f587883 ("rust: bitmap: clean Rust 1.92.0 `unused_unsafe` warning")
Reviewed-by: default avatarBurak Emir <bqe@google.com>
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 32f072d9
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -167,7 +167,9 @@ fn deref(&self) -> &Bitmap {
        let ptr = if self.nbits <= BITS_PER_LONG {
            // SAFETY: Bitmap is represented inline.
            #[allow(unused_unsafe, reason = "Safe since Rust 1.92.0")]
            unsafe { core::ptr::addr_of!(self.repr.bitmap) }
            unsafe {
                core::ptr::addr_of!(self.repr.bitmap)
            }
        } else {
            // SAFETY: Bitmap is represented as array of `unsigned long`.
            unsafe { self.repr.ptr.as_ptr() }
@@ -184,7 +186,9 @@ fn deref_mut(&mut self) -> &mut Bitmap {
        let ptr = if self.nbits <= BITS_PER_LONG {
            // SAFETY: Bitmap is represented inline.
            #[allow(unused_unsafe, reason = "Safe since Rust 1.92.0")]
            unsafe { core::ptr::addr_of_mut!(self.repr.bitmap) }
            unsafe {
                core::ptr::addr_of_mut!(self.repr.bitmap)
            }
        } else {
            // SAFETY: Bitmap is represented as array of `unsigned long`.
            unsafe { self.repr.ptr.as_ptr() }