Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Shrink unsafe blocks #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions src/x86/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1143,87 +1143,87 @@ impl kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1 {
}
#[inline]
pub fn set_delivery_mode(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);

let val: u8 = unsafe { ::std::mem::transmute(val) };
self._bitfield_1.set(0usize, 3u8, val as u64)
}

}
#[inline]
pub fn dest_mode(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
}
#[inline]
pub fn set_dest_mode(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);

let val: u8 = unsafe { ::std::mem::transmute(val) };
self._bitfield_1.set(3usize, 1u8, val as u64)
}

}
#[inline]
pub fn delivery_status(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) }
}
#[inline]
pub fn set_delivery_status(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);

let val: u8 = unsafe { ::std::mem::transmute(val) };
self._bitfield_1.set(4usize, 1u8, val as u64)
}

}
#[inline]
pub fn polarity(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) }
}
#[inline]
pub fn set_polarity(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);

let val: u8 = unsafe { ::std::mem::transmute(val) };
self._bitfield_1.set(5usize, 1u8, val as u64)
}

}
#[inline]
pub fn remote_irr(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) }
}
#[inline]
pub fn set_remote_irr(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);

let val: u8 = unsafe { ::std::mem::transmute(val) };
self._bitfield_1.set(6usize, 1u8, val as u64)
}

}
#[inline]
pub fn trig_mode(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) }
}
#[inline]
pub fn set_trig_mode(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);

let val: u8 = unsafe { ::std::mem::transmute(val) };
self._bitfield_1.set(7usize, 1u8, val as u64)
}

}
#[inline]
pub fn mask(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) }
}
#[inline]
pub fn set_mask(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);

let val: u8 = unsafe ::std::mem::transmute(val);
self._bitfield_1.set(8usize, 1u8, val as u64)
}

}
#[inline]
pub fn reserve(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 7u8) as u8) }
}
#[inline]
pub fn set_reserve(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);

let val: u8 = unsafe { ::std::mem::transmute(val) };
self._bitfield_1.set(9usize, 7u8, val as u64)
}

}
#[inline]
pub fn new_bitfield_1(
Expand Down