summaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen')
-rwxr-xr-xsrc/codegen/bitfield_unit.rs9
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());