aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2018-01-06 01:42:55 +0000
committerGitHub <noreply@github.com>2018-01-06 01:42:55 +0000
commit2920cbe7103f03a45080bfb7610bd7f481f36361 (patch)
tree4839deca8a54d8e2546d124eb26178fd1eac4d4a /src/main.rs
parent650b5a0cbaccc6de2b53240372c2be79739d5d12 (diff)
downloadalacritty-2920cbe7103f03a45080bfb7610bd7f481f36361.tar.gz
alacritty-2920cbe7103f03a45080bfb7610bd7f481f36361.zip
Add clippy check to travis
This commit adds clippy as a required step of the build process. To make this possible, all existing clippy issues have been resolved.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 42aa9449..bb267ed4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -13,8 +13,14 @@
// limitations under the License.
//
//! Alacritty - The GPU Enhanced Terminal
-#![cfg_attr(feature = "clippy", plugin(clippy))]
#![cfg_attr(feature = "clippy", feature(plugin))]
+#![cfg_attr(feature = "clippy", plugin(clippy))]
+#![cfg_attr(feature = "clippy", deny(clippy))]
+#![cfg_attr(feature = "clippy", deny(enum_glob_use))]
+#![cfg_attr(feature = "clippy", deny(if_not_else))]
+#![cfg_attr(feature = "clippy", deny(wrong_pub_self_convention))]
+#![cfg_attr(feature = "nightly", feature(core_intrinsics))]
+#![cfg_attr(all(test, feature = "bench"), feature(test))]
#[macro_use]
extern crate alacritty;
@@ -64,7 +70,7 @@ fn main() {
/// /dev/null, we load the compiled-in defaults.
fn load_config(options: &cli::Options) -> Config {
let config_path = options.config_path()
- .or_else(|| Config::installed_config())
+ .or_else(Config::installed_config)
.unwrap_or_else(|| {
Config::write_defaults()
.unwrap_or_else(|err| die!("Write defaults config failure: {}", err))
@@ -116,7 +122,7 @@ fn run(mut config: Config, options: &cli::Options) -> Result<(), Box<Error>> {
// The pty forks a process to run the shell on the slave side of the
// pseudoterminal. A file descriptor for the master side is retained for
// reading/writing to the shell.
- let mut pty = tty::new(&config, options, display.size(), window_id);
+ let mut pty = tty::new(&config, options, &display.size(), window_id);
// Create the pseudoterminal I/O loop
//