diff options
Diffstat (limited to 'src/codegen')
-rwxr-xr-x | src/codegen/bitfield_unit.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/codegen/bitfield_unit.rs b/src/codegen/bitfield_unit.rs index 7f263fd1..5c7a09bd 100755 --- a/src/codegen/bitfield_unit.rs +++ b/src/codegen/bitfield_unit.rs @@ -1,16 +1,12 @@ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit<Storage, Align> -where - Storage: AsRef<[u8]> + AsMut<[u8]>, { storage: Storage, align: [Align; 0], } impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align> -where - Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] pub fn new(storage: Storage) -> Self { @@ -19,7 +15,12 @@ where align: [], } } +} +impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align> +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ #[inline] pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); |