1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 13:21:38 +03:00

cargo fmt

This commit is contained in:
Wez Furlong 2020-05-02 17:39:45 -07:00
parent 94bccf1dfb
commit fa32457656
2 changed files with 13 additions and 10 deletions

View File

@ -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> {

View File

@ -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]