From e1d248785a7ca252f218008caa52b84e7aa81d79 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Wed, 4 Jul 2018 14:24:20 +0300 Subject: [PATCH] Check the code with rustfmt --- .travis.yml | 1 + ci/script.sh | 1 + src/main.rs | 5 ++--- src/vim.rs | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7bb6b6d6..5b67297f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,7 @@ matrix: before_install: - set -e - rustup self update + - rustup component add rustfmt-preview install: - sh ci/install.sh diff --git a/ci/script.sh b/ci/script.sh index b50a1023..8ba87120 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -4,6 +4,7 @@ set -ex # TODO This is the "test phase", tweak it as you see fit main() { + cargo fmt --all -- --write-mode=check cross build --target $TARGET cross build --target $TARGET --release diff --git a/src/main.rs b/src/main.rs index a0f21459..5e53d062 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,10 +12,10 @@ extern crate serde; extern crate shellexpand; #[macro_use] extern crate log; +extern crate app_dirs; extern crate env_logger; extern crate term_size; extern crate termcolor; -extern crate app_dirs; #[cfg(target_os = "linux")] mod linux; @@ -198,8 +198,7 @@ fn run() -> Result<(), Error> { if let Some(nvimrc) = vim::nvimrc() { if let Some(plugin_framework) = vim::PluginFramework::detect(&nvimrc) { terminal.print_separator(&format!("neovim ({:?})", plugin_framework)); - run_vim(&nvim, &nvimrc, plugin_framework.upgrade_command()) - .report("neovim", &mut reports); + run_vim(&nvim, &nvimrc, plugin_framework.upgrade_command()).report("neovim", &mut reports); } } } diff --git a/src/vim.rs b/src/vim.rs index 9a7c1e42..c8d75abd 100644 --- a/src/vim.rs +++ b/src/vim.rs @@ -1,7 +1,7 @@ use super::home_path; +use app_dirs::*; use std::fs; use std::path::PathBuf; -use app_dirs::*; #[derive(Debug, Clone, Copy)] pub enum PluginFramework {