alacritty

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 3478676f8f7ec6817b1e17d09926fc35a507977a
parent d406627acb68ff861803c09089462027eb69b5e5
Author: Matthias Kr├╝ger <matthias.krueger@famsik.de>
Date:   Thu, 11 Apr 2019 09:54:26 +0200

Remove redundant closures and imports


Diffstat:
Mcopypasta/src/x11.rs | 2+-
Msrc/cli.rs | 4++--
Msrc/grid/row.rs | 2+-
Msrc/term/mod.rs | 3---
4 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/copypasta/src/x11.rs b/copypasta/src/x11.rs @@ -124,7 +124,7 @@ impl Clipboard { S: AsRef<OsStr>, { use std::io::Write; - use std::process::{Command, Stdio}; + use std::process::Stdio; let contents = contents.into(); let mut child = Command::new("xclip").args(args).stdin(Stdio::piped()).spawn()?; diff --git 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 @@ -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 @@ -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,