Fix clippy warnings in EncodingBits
This commit is contained in:
@@ -59,20 +59,18 @@ impl EncodingBits {
|
||||
|
||||
/// Returns a copy of the EncodingBits with the RRR bits set.
|
||||
#[inline]
|
||||
pub fn with_rrr(self, rrr: u8) -> Self {
|
||||
debug_assert_eq!(u8::from(self.rrr()), 0);
|
||||
let mut enc = self.clone();
|
||||
enc.write(RRR, rrr.into());
|
||||
enc
|
||||
pub fn with_rrr(mut self, rrr: u8) -> Self {
|
||||
debug_assert_eq!(self.rrr(), 0);
|
||||
self.write(RRR, rrr.into());
|
||||
self
|
||||
}
|
||||
|
||||
/// Returns a copy of the EncodingBits with the REX.W bit set.
|
||||
#[inline]
|
||||
pub fn with_rex_w(self) -> Self {
|
||||
pub fn with_rex_w(mut self) -> Self {
|
||||
debug_assert_eq!(self.rex_w(), 0);
|
||||
let mut enc = self.clone();
|
||||
enc.write(REX_W, 1);
|
||||
enc
|
||||
self.write(REX_W, 1);
|
||||
self
|
||||
}
|
||||
|
||||
/// Returns the raw bits.
|
||||
|
||||
Reference in New Issue
Block a user