lib: rustfmt

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-09-27 12:06:20 +08:00
parent 5de52c0809
commit 4aa4eae649

View File

@ -134,11 +134,7 @@ where
pub fn w(&mut self, reg: Register, value: T) { pub fn w(&mut self, reg: Register, value: T) {
let usize_base: *mut usize = unsafe { core::mem::transmute(self.base) }; let usize_base: *mut usize = unsafe { core::mem::transmute(self.base) };
let value_as_usize: usize = value.try_into().unwrap_or_default(); let value_as_usize: usize = value.try_into().unwrap_or_default();
unsafe { unsafe { usize_base.add(reg.offset).write_volatile(value_as_usize) };
usize_base
.add(reg.offset)
.write_volatile(value_as_usize)
};
} }
} }