mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 13:21:38 +03:00
cargo fmt
This commit is contained in:
parent
94bccf1dfb
commit
fa32457656
@ -230,17 +230,20 @@ macro_rules! int {
|
||||
V: Visitor<'de>,
|
||||
{
|
||||
match self.0 {
|
||||
Value::Integer(i) => {
|
||||
v.$visit(i .try_into().map_err(|e| {
|
||||
Error::custom(format!(
|
||||
"lua Integer value {} doesn't fit \
|
||||
in specified type: {}", i, e))
|
||||
})?)
|
||||
}
|
||||
_ => Err(serde::de::Error::invalid_type(unexpected(&self.0), &"integer")),
|
||||
Value::Integer(i) => v.$visit(i.try_into().map_err(|e| {
|
||||
Error::custom(format!(
|
||||
"lua Integer value {} doesn't fit \
|
||||
in specified type: {}",
|
||||
i, e
|
||||
))
|
||||
})?),
|
||||
_ => Err(serde::de::Error::invalid_type(
|
||||
unexpected(&self.0),
|
||||
&"integer",
|
||||
)),
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
impl<'de, 'lua> Deserializer<'de> for ValueWrapper<'lua> {
|
||||
|
@ -67,7 +67,7 @@ macro_rules! bitfield {
|
||||
($getter:ident, $setter:ident, $enum:ident, $bitmask:expr, $bitshift:expr) => {
|
||||
#[inline]
|
||||
pub fn $getter(&self) -> $enum {
|
||||
unsafe { mem::transmute(((self.attributes >> $bitshift) & $bitmask) as u16)}
|
||||
unsafe { mem::transmute(((self.attributes >> $bitshift) & $bitmask) as u16) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
Loading…
Reference in New Issue
Block a user