diff --git a/codec/src/lib.rs b/codec/src/lib.rs index a1092a40f..fd45f0788 100644 --- a/codec/src/lib.rs +++ b/codec/src/lib.rs @@ -34,7 +34,7 @@ use wezterm_term::{ClipboardSelection, StableRowIndex}; /// Returns the encoded length of the leb128 representation of value fn encoded_length(value: u64) -> usize { - struct NullWrite {}; + struct NullWrite {} impl std::io::Write for NullWrite { fn write(&mut self, buf: &[u8]) -> std::result::Result { Ok(buf.len()) @@ -42,7 +42,7 @@ fn encoded_length(value: u64) -> usize { fn flush(&mut self) -> std::result::Result<(), std::io::Error> { Ok(()) } - }; + } leb128::write::unsigned(&mut NullWrite {}, value).unwrap() } diff --git a/config/src/keyassignment.rs b/config/src/keyassignment.rs index 032ed58a5..34c2a5eca 100644 --- a/config/src/keyassignment.rs +++ b/config/src/keyassignment.rs @@ -224,14 +224,14 @@ impl InputMap { keys.entry(($code, $mod)).or_insert($action); )* }; - }; + } macro_rules! m { ($([$mod:expr, $code:expr, $action:expr]),* $(,)?) => { $( mouse.entry(($code, $mod)).or_insert($action); )* }; - }; + } use KeyAssignment::*; diff --git a/termwiz/src/color.rs b/termwiz/src/color.rs index 8616cfe1c..e9cbd30d6 100644 --- a/termwiz/src/color.rs +++ b/termwiz/src/color.rs @@ -117,7 +117,7 @@ impl RgbColor { } else { ((v + 0.055) / 1.055).powf(2.4) } - }; + } ( to_linear(self.red), to_linear(self.green), diff --git a/termwiz/src/escape/csi.rs b/termwiz/src/escape/csi.rs index d9478f969..357e05e3d 100644 --- a/termwiz/src/escape/csi.rs +++ b/termwiz/src/escape/csi.rs @@ -1846,7 +1846,7 @@ impl<'a> CSIParser<'a> { ($t:expr) => { Ok(self.advance_by(1, params, $t)) }; - }; + } match ¶ms[0] { CsiParam::Integer(i) => match FromPrimitive::from_i64(*i) { diff --git a/termwiz/src/escape/osc.rs b/termwiz/src/escape/osc.rs index 58d814140..a55381717 100644 --- a/termwiz/src/escape/osc.rs +++ b/termwiz/src/escape/osc.rs @@ -126,7 +126,7 @@ impl Display for Selection { write!(f, $s)?; } }; - }; + } item!(CLIPBOARD, "c"); item!(PRIMARY, "p"); @@ -280,7 +280,7 @@ impl OperatingSystemCommand { Ok(OperatingSystemCommand::$variant(s)) }}; - }; + } use self::OperatingSystemCommandCode::*; match osc_code { @@ -470,7 +470,7 @@ impl Display for OperatingSystemCommand { } } }}; - }; + } use self::OperatingSystemCommand::*; match self { @@ -663,7 +663,7 @@ impl FinalTermSemanticPrompt { return Ok(FinalTermSemanticPrompt::$variant); } }; - }; + } single!(FreshLine, "L"); single!(MarkEndOfPromptAndStartOfInputUntilNextMarker, "B"); @@ -1057,7 +1057,7 @@ impl ITermProprietary { return Ok(ITermProprietary::$variant); } }; - }; + } macro_rules! one_str { ($variant:ident, $text:expr) => { @@ -1067,7 +1067,7 @@ impl ITermProprietary { } } }; - }; + } macro_rules! const_arg { ($variant:ident, $text:expr, $value:expr, $res:expr) => { if osc.len() == 2 && keyword == $text { diff --git a/wezterm-font/src/lib.rs b/wezterm-font/src/lib.rs index 4249910b8..149cbc2a9 100644 --- a/wezterm-font/src/lib.rs +++ b/wezterm-font/src/lib.rs @@ -412,7 +412,7 @@ impl FontConfigInner { } // matches so far... }; - }; + } for rule in &config.font_rules { attr_match!(intensity, &rule);