diff options
author | alexmoon <alex.r.moon@gmail.com> | 2022-07-14 15:45:28 -0400 |
---|---|---|
committer | alexmoon <alex.r.moon@gmail.com> | 2022-07-14 15:45:28 -0400 |
commit | 98a31ce672c3113a2c238dc4e2ae9d632e59713a (patch) | |
tree | 36af82b9b26b04e2a7738515d50fc6b189d540b0 /nrf-softdevice/src/util/mod.rs | |
parent | 84006cd336adf2642cb5716433abb5540c4fb8b9 (diff) | |
download | nrf-softdevice-98a31ce672c3113a2c238dc4e2ae9d632e59713a.zip |
Add rustfmt.toml to match embassy formatting
Diffstat (limited to 'nrf-softdevice/src/util/mod.rs')
-rw-r--r-- | nrf-softdevice/src/util/mod.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/nrf-softdevice/src/util/mod.rs b/nrf-softdevice/src/util/mod.rs index c341a1d..03492d3 100644 --- a/nrf-softdevice/src/util/mod.rs +++ b/nrf-softdevice/src/util/mod.rs @@ -32,10 +32,7 @@ pub(crate) unsafe fn get_flexarray<T>( /// This function is a workaround for UB in __BindgenUnionField /// see https://github.com/rust-lang/rust-bindgen/issues/1892 /// see https://github.com/rust-lang/unsafe-code-guidelines/issues/134 -pub(crate) unsafe fn get_union_field<T>( - orig_ptr: *const raw::ble_evt_t, - member: &raw::__BindgenUnionField<T>, -) -> &T { +pub(crate) unsafe fn get_union_field<T>(orig_ptr: *const raw::ble_evt_t, member: &raw::__BindgenUnionField<T>) -> &T { let offs = member as *const _ as usize - orig_ptr as usize; let sanitized_ptr = (orig_ptr as *const u8).add(offs) as *const T; &*sanitized_ptr |