mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
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:
parent
587f7f5a47
commit
fac7cce224
@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user