aboutsummaryrefslogtreecommitdiff
path: root/src/main.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/main.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/main.rs')
-rw-r--r--src/main.rs26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/main.rs b/src/main.rs
index 9d57f086..fea14b5f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -23,13 +23,13 @@
// See https://msdn.microsoft.com/en-us/library/4cc7ya5b.aspx for more details.
#![windows_subsystem = "windows"]
-#[macro_use]
-extern crate alacritty;
-
-#[macro_use]
-extern crate log;
#[cfg(target_os = "macos")]
-extern crate dirs;
+use dirs;
+
+#[cfg(windows)]
+use winapi::um::wincon::{AttachConsole, FreeConsole, ATTACH_PARENT_PROCESS};
+
+use log::{info, error};
use std::error::Error;
use std::sync::Arc;
@@ -40,18 +40,12 @@ use std::env;
#[cfg(not(windows))]
use std::os::unix::io::AsRawFd;
-#[cfg(windows)]
-extern crate winapi;
-#[cfg(windows)]
-use winapi::um::wincon::{AttachConsole, FreeConsole, ATTACH_PARENT_PROCESS};
-
-use alacritty::cli;
+#[cfg(target_os = "macos")]
+use alacritty::locale;
+use alacritty::{cli, event, die};
use alacritty::config::{self, Config, Error as ConfigError};
use alacritty::display::Display;
-use alacritty::event;
use alacritty::event_loop::{self, EventLoop, Msg};
-#[cfg(target_os = "macos")]
-use alacritty::locale;
use alacritty::logging::{self, LoggerProxy};
use alacritty::sync::FairMutex;
use alacritty::term::Term;
@@ -118,7 +112,7 @@ fn run(
mut config: Config,
options: &cli::Options,
mut logger_proxy: LoggerProxy,
-) -> Result<(), Box<Error>> {
+) -> Result<(), Box<dyn Error>> {
info!("Welcome to Alacritty.");
if let Some(config_path) = config.path() {
info!("Configuration loaded from {}", config_path.display());