diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 0000000..936c0b9 --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1,2 @@ +edition = "2021" +fn_params_layout = "Compressed" diff --git a/libvfio-user/src/callbacks.rs b/libvfio-user/src/callbacks.rs index 79e3608..2200fd1 100644 --- a/libvfio-user/src/callbacks.rs +++ b/libvfio-user/src/callbacks.rs @@ -15,9 +15,7 @@ macro_rules! device_context_from_vfu_ctx { } pub(crate) unsafe extern "C" fn log_callback( - vfu_ctx: *mut vfu_ctx_t, - level: c_int, - msg: *const c_char, + vfu_ctx: *mut vfu_ctx_t, level: c_int, msg: *const c_char, ) { let device_context = device_context_from_vfu_ctx!(vfu_ctx); let msg = unsafe { CStr::from_ptr(msg) }; @@ -54,11 +52,7 @@ impl DeviceRegionKind { } pub(crate) unsafe extern "C" fn region_access_callback( - vfu_ctx: *mut vfu_ctx_t, - buf: *mut c_char, - count: usize, - offset: loff_t, - is_write: bool, + vfu_ctx: *mut vfu_ctx_t, buf: *mut c_char, count: usize, offset: loff_t, is_write: bool, ) -> isize { let device_context = device_context_from_vfu_ctx!(vfu_ctx); let device = &mut device_context.device;