summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2019-04-11 09:54:26 +0200
committerChristian Duerr <chrisduerr@users.noreply.github.com>2019-04-11 07:54:26 +0000
commit3478676f8f7ec6817b1e17d09926fc35a507977a (patch)
treec1b6d403446a312b635a3f1b75e884c3bc646a60 /src
parentd406627acb68ff861803c09089462027eb69b5e5 (diff)
downloadalacritty-3478676f8f7ec6817b1e17d09926fc35a507977a.tar.gz
alacritty-3478676f8f7ec6817b1e17d09926fc35a507977a.zip
Remove redundant closures and imports
Diffstat (limited to 'src')
-rw-r--r--src/cli.rs4
-rw-r--r--src/grid/row.rs2
-rw-r--r--src/term/mod.rs3
3 files changed, 3 insertions, 6 deletions
diff --git a/src/cli.rs b/src/cli.rs
index db108053..2cddbc82 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -182,8 +182,8 @@ impl Options {
}
if let Some(mut position) = matches.values_of("position") {
- let x = position.next().map(|x| x.parse::<i32>());
- let y = position.next().map(|y| y.parse::<i32>());
+ let x = position.next().map(str::parse);
+ let y = position.next().map(str::parse);
if let (Some(Ok(x)), Some(Ok(y))) = (x, y) {
options.position = Some(Delta { x, y });
}
diff --git a/src/grid/row.rs b/src/grid/row.rs
index 0a58de97..88a23871 100644
--- a/src/grid/row.rs
+++ b/src/grid/row.rs
@@ -133,7 +133,7 @@ impl<T> Row<T> {
where
T: GridCell,
{
- self.inner.iter().all(|c| c.is_empty())
+ self.inner.iter().all(GridCell::is_empty)
}
#[inline]
diff --git a/src/term/mod.rs b/src/term/mod.rs
index 61bc1509..9ab0aad9 100644
--- a/src/term/mod.rs
+++ b/src/term/mod.rs
@@ -351,7 +351,6 @@ impl<'a> RenderableCellsIter<'a> {
}
fn compute_fg_rgb(&self, fg: Color, cell: &Cell) -> Rgb {
- use self::cell::Flags;
match fg {
Color::Spec(rgb) => rgb,
Color::Named(ansi) => {
@@ -1024,8 +1023,6 @@ impl Term {
}
}
- use std::ops::Range;
-
trait Append: PushChar {
fn append(
&mut self,