summaryrefslogtreecommitdiff
path: root/src/display.rs
diff options
context:
space:
mode:
authorJoe Wilm <jwilm@users.noreply.github.com>2018-12-10 09:53:56 -0800
committerChristian Duerr <chrisduerr@users.noreply.github.com>2018-12-10 17:53:56 +0000
commit217ad9ec285b4923de1790b0976c8c793039c994 (patch)
tree440e0d6d35f119246d2b113fd01b431f4f9c2c38 /src/display.rs
parent7ab0b448479c9705fa14003bda97040630710b7a (diff)
downloadalacritty-217ad9ec285b4923de1790b0976c8c793039c994.tar.gz
alacritty-217ad9ec285b4923de1790b0976c8c793039c994.zip
Upgrade to Rust 2018
This resolves a lot of NLL issues, however full NLL will be necessary to handle a couple of remaining issues.
Diffstat (limited to 'src/display.rs')
-rw-r--r--src/display.rs30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/display.rs b/src/display.rs
index 8696bf10..99889c67 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -20,16 +20,16 @@ use std::f64;
use parking_lot::MutexGuard;
use glutin::dpi::{LogicalPosition, PhysicalSize};
-use cli;
-use config::Config;
+use crate::cli;
+use crate::config::Config;
use font::{self, Rasterize};
-use meter::Meter;
-use renderer::{self, GlyphCache, QuadRenderer};
-use term::{Term, SizeInfo, RenderableCell};
-use sync::FairMutex;
-use window::{self, Window};
-use logging::LoggerProxy;
-use Rgb;
+use crate::meter::Meter;
+use crate::renderer::{self, GlyphCache, QuadRenderer};
+use crate::term::{Term, SizeInfo, RenderableCell};
+use crate::sync::FairMutex;
+use crate::window::{self, Window};
+use crate::logging::LoggerProxy;
+use crate::Rgb;
#[derive(Debug)]
pub enum Error {
@@ -44,7 +44,7 @@ pub enum Error {
}
impl ::std::error::Error for Error {
- fn cause(&self) -> Option<&::std::error::Error> {
+ fn cause(&self) -> Option<&dyn (::std::error::Error)> {
match *self {
Error::Window(ref err) => Some(err),
Error::Font(ref err) => Some(err),
@@ -62,7 +62,7 @@ impl ::std::error::Error for Error {
}
impl ::std::fmt::Display for Error {
- fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Error::Window(ref err) => err.fmt(f),
Error::Font(ref err) => err.fmt(f),
@@ -292,9 +292,9 @@ impl Display {
/// Process pending resize events
pub fn handle_resize(
&mut self,
- terminal: &mut MutexGuard<Term>,
+ terminal: &mut MutexGuard<'_, Term>,
config: &Config,
- items: &mut [&mut OnResize],
+ items: &mut [&mut dyn OnResize],
) {
// Resize events new_size and are handled outside the poll_events
// iterator. This has the effect of coalescing multiple resize
@@ -476,8 +476,8 @@ impl Display {
/// Adjust the IME editor position according to the new location of the cursor
pub fn update_ime_position(&mut self, terminal: &Term) {
- use index::{Column, Line, Point};
- use term::SizeInfo;
+ use crate::index::{Column, Line, Point};
+ use crate::term::SizeInfo;
let Point{line: Line(row), col: Column(col)} = terminal.cursor().point;
let SizeInfo{cell_width: cw,
cell_height: ch,