From cf2c19706e31e1f7149c0343927f832e153394e0 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Mon, 9 Sep 2019 06:03:01 -0400 Subject: [PATCH] fix build warnings & add CI --- .azure/azure-pipelines.yml | 2 ++ src/commands/config.rs | 2 +- src/plugins/binaryview.rs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.azure/azure-pipelines.yml b/.azure/azure-pipelines.yml index 50ebcf1e24..2c36e99691 100644 --- a/.azure/azure-pipelines.yml +++ b/.azure/azure-pipelines.yml @@ -21,5 +21,7 @@ steps: rustc -Vv echo "##vso[task.prependpath]$HOME/.cargo/bin" displayName: Install Rust + - bash: RUSTFLAGS="-D warnings" cargo build --all-features + displayName: Build - bash: RUSTFLAGS="-D warnings" cargo test displayName: Run tests diff --git a/src/commands/config.rs b/src/commands/config.rs index c1f000d04d..5dfb28bf31 100644 --- a/src/commands/config.rs +++ b/src/commands/config.rs @@ -114,7 +114,7 @@ pub fn config( let key = v.to_string(); if result.contains_key(&key) { - result.remove(&key); + result.swap_remove(&key); config::write_config(&result)?; } else { return Err(ShellError::string(&format!( diff --git a/src/plugins/binaryview.rs b/src/plugins/binaryview.rs index c321e8115c..a6b8df8990 100644 --- a/src/plugins/binaryview.rs +++ b/src/plugins/binaryview.rs @@ -435,7 +435,7 @@ pub fn view_contents_interactive( let cursor = cursor(); let _ = cursor.show(); - let screen = RawScreen::disable_raw_mode(); + let _screen = RawScreen::disable_raw_mode(); Ok(()) }