fix: unbreak subvolume commands

This was a stupid mistake by me, "fixing" more than what clippy told me
to. `p` is already a reference and we should not use the addr of it.

Fixes: 96a3462 ("refactor: casting-related `clippy::pedantic` fixes")
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
This commit is contained in:
Thomas Mühlbacher 2024-06-03 16:57:27 +02:00
parent 587f7f5a47
commit fac7cce224

View File

@ -1,4 +1,4 @@
use std::{path::Path, ptr};
use std::path::Path;
use bch_bindgen::c::{
bcache_fs_close, bcache_fs_open, bch_ioctl_subvolume, bchfs_handle, BCH_IOCTL_SUBVOLUME_CREATE,
@ -42,7 +42,7 @@ pub enum BcachefsIoctlPayload {
impl From<&BcachefsIoctlPayload> for *const libc::c_void {
fn from(value: &BcachefsIoctlPayload) -> Self {
match value {
BcachefsIoctlPayload::Subvolume(p) => ptr::addr_of!(p).cast(),
BcachefsIoctlPayload::Subvolume(p) => (p as *const bch_ioctl_subvolume).cast(),
}
}
}