lint: remove redundant semicolons

Newer versions of Rust emit warnings for these
This commit is contained in:
Wez Furlong committed 2021-03-25 09:44:27 -07:00
1 parent dbd7fc28a5
commit 3bec6fb5c0
6 files changed
+13 -13

No files matched your search

+2 -2
View File
@@ -34,7 +34,7 @@ use wezterm_term::{ClipboardSelection, StableRowIndex};
/// Returns the encoded length of the leb128 representation of value /// Returns the encoded length of the leb128 representation of value
fn encoded_length(value: u64) -> usize { fn encoded_length(value: u64) -> usize {
struct NullWrite {}; struct NullWrite {}
impl std::io::Write for NullWrite { impl std::io::Write for NullWrite {
fn write(&mut self, buf: &[u8]) -> std::result::Result<usize, std::io::Error> { fn write(&mut self, buf: &[u8]) -> std::result::Result<usize, std::io::Error> {
Ok(buf.len()) Ok(buf.len())
@@ -42,7 +42,7 @@ fn encoded_length(value: u64) -> usize {
fn flush(&mut self) -> std::result::Result<(), std::io::Error> { fn flush(&mut self) -> std::result::Result<(), std::io::Error> {
Ok(()) Ok(())
} }
}; }
leb128::write::unsigned(&mut NullWrite {}, value).unwrap() leb128::write::unsigned(&mut NullWrite {}, value).unwrap()
} }
+2 -2
View File
@@ -224,14 +224,14 @@ impl InputMap {
keys.entry(($code, $mod)).or_insert($action); keys.entry(($code, $mod)).or_insert($action);
)* )*
}; };
}; }
macro_rules! m { macro_rules! m {
($([$mod:expr, $code:expr, $action:expr]),* $(,)?) => { ($([$mod:expr, $code:expr, $action:expr]),* $(,)?) => {
$( $(
mouse.entry(($code, $mod)).or_insert($action); mouse.entry(($code, $mod)).or_insert($action);
)* )*
}; };
}; }
use KeyAssignment::*; use KeyAssignment::*;
+1 -1
View File
@@ -117,7 +117,7 @@ impl RgbColor {
} else { } else {
((v + 0.055) / 1.055).powf(2.4) ((v + 0.055) / 1.055).powf(2.4)
} }
}; }
( (
to_linear(self.red), to_linear(self.red),
to_linear(self.green), to_linear(self.green),
+1 -1
View File
@@ -1846,7 +1846,7 @@ impl<'a> CSIParser<'a> {
($t:expr) => { ($t:expr) => {
Ok(self.advance_by(1, params, $t)) Ok(self.advance_by(1, params, $t))
}; };
}; }
match &params[0] { match &params[0] {
CsiParam::Integer(i) => match FromPrimitive::from_i64(*i) { CsiParam::Integer(i) => match FromPrimitive::from_i64(*i) {
+6 -6
View File
@@ -126,7 +126,7 @@ impl Display for Selection {
write!(f, $s)?; write!(f, $s)?;
} }
}; };
}; }
item!(CLIPBOARD, "c"); item!(CLIPBOARD, "c");
item!(PRIMARY, "p"); item!(PRIMARY, "p");
@@ -280,7 +280,7 @@ impl OperatingSystemCommand {
Ok(OperatingSystemCommand::$variant(s)) Ok(OperatingSystemCommand::$variant(s))
}}; }};
}; }
use self::OperatingSystemCommandCode::*; use self::OperatingSystemCommandCode::*;
match osc_code { match osc_code {
@@ -470,7 +470,7 @@ impl Display for OperatingSystemCommand {
} }
} }
}}; }};
}; }
use self::OperatingSystemCommand::*; use self::OperatingSystemCommand::*;
match self { match self {
@@ -663,7 +663,7 @@ impl FinalTermSemanticPrompt {
return Ok(FinalTermSemanticPrompt::$variant); return Ok(FinalTermSemanticPrompt::$variant);
} }
}; };
}; }
single!(FreshLine, "L"); single!(FreshLine, "L");
single!(MarkEndOfPromptAndStartOfInputUntilNextMarker, "B"); single!(MarkEndOfPromptAndStartOfInputUntilNextMarker, "B");
@@ -1057,7 +1057,7 @@ impl ITermProprietary {
return Ok(ITermProprietary::$variant); return Ok(ITermProprietary::$variant);
} }
}; };
}; }
macro_rules! one_str { macro_rules! one_str {
($variant:ident, $text:expr) => { ($variant:ident, $text:expr) => {
@@ -1067,7 +1067,7 @@ impl ITermProprietary {
} }
} }
}; };
}; }
macro_rules! const_arg { macro_rules! const_arg {
($variant:ident, $text:expr, $value:expr, $res:expr) => { ($variant:ident, $text:expr, $value:expr, $res:expr) => {
if osc.len() == 2 && keyword == $text { if osc.len() == 2 && keyword == $text {
+1 -1
View File
@@ -412,7 +412,7 @@ impl FontConfigInner {
} }
// matches so far... // matches so far...
}; };
}; }
for rule in &config.font_rules { for rule in &config.font_rules {
attr_match!(intensity, &rule); attr_match!(intensity, &rule);