From fa324576566fe40de9c6a8cfde42cc157342d92a Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 2 May 2020 17:39:45 -0700 Subject: [PATCH] cargo fmt --- src/scripting/serde_lua/mod.rs | 21 ++++++++++++--------- termwiz/src/cell.rs | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/scripting/serde_lua/mod.rs b/src/scripting/serde_lua/mod.rs index b4cd5608a..504965223 100644 --- a/src/scripting/serde_lua/mod.rs +++ b/src/scripting/serde_lua/mod.rs @@ -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> { diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs index 64bb68d2c..83fcfad1f 100644 --- a/termwiz/src/cell.rs +++ b/termwiz/src/cell.rs @@ -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]