summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-12-31 08:47:07 -0800
committerDaniel Mueller <deso@posteo.net>2019-12-31 08:47:07 -0800
commit63d4197570e1066805bf76f6bc466fb5eb294036 (patch)
tree4d65c32d4ba87052bf438ec0b800a7617d4dc9ae
parent476cbd7238b0a4a0fd842ca5be7706f19c936a12 (diff)
downloadnitrocli-63d4197570e1066805bf76f6bc466fb5eb294036.tar.gz
nitrocli-63d4197570e1066805bf76f6bc466fb5eb294036.tar.bz2
Update minimum required Rust version to 1.35.0
This change updates the minimum required version of Rust to 1.35.0. The motivation for doing so is at least two fold. First, next we want to bump the nitrokey crate to version 0.4.0 and it requires Rust 1.34.0 as a minimum. Second, and perhaps more importantly, though, in 1.34.0 a clippy lint regressed, breaking our pipeline. That is the reason why we are going to 1.35.0 instead.
-rw-r--r--nitrocli/README.md2
-rw-r--r--nitrocli/ci/gitlab-ci.yml4
-rw-r--r--nitrocli/src/commands.rs8
-rw-r--r--nitrocli/src/pinentry.rs4
-rw-r--r--nitrocli/src/tests/mod.rs6
5 files changed, 10 insertions, 14 deletions
diff --git a/nitrocli/README.md b/nitrocli/README.md
index 613527a..1bab1c7 100644
--- a/nitrocli/README.md
+++ b/nitrocli/README.md
@@ -1,6 +1,6 @@
[![pipeline](https://gitlab.com/d-e-s-o/nitrocli/badges/master/pipeline.svg)](https://gitlab.com/d-e-s-o/nitrocli/commits/master)
[![crates.io](https://img.shields.io/crates/v/nitrocli.svg)](https://crates.io/crates/nitrocli)
-[![rustc](https://img.shields.io/badge/rustc-1.31+-blue.svg)](https://blog.rust-lang.org/2018/12/06/Rust-1.31-and-rust-2018.html)
+[![rustc](https://img.shields.io/badge/rustc-1.35+-blue.svg)](https://blog.rust-lang.org/2019/05/23/Rust-1.35.0.html)
nitrocli
========
diff --git a/nitrocli/ci/gitlab-ci.yml b/nitrocli/ci/gitlab-ci.yml
index 76ee517..29bf59d 100644
--- a/nitrocli/ci/gitlab-ci.yml
+++ b/nitrocli/ci/gitlab-ci.yml
@@ -4,8 +4,8 @@
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/rust/tags/
# The recipe for this docker image can be found at:
-# https://github.com/rust-lang/docker-rust/blob/e7703b2cf525f2525bdf8d131cd66b5b38b1513c/1.31.0/stretch/Dockerfile
-image: "rust:1.31.0"
+# https://github.com/rust-lang/docker-rust/blob/29bf41a2cc4fb8d3f588cf51eb6a8ba883808c4b/1.35.0/stretch/Dockerfile
+image: "rust:1.35.0"
build-test:cargo:
script:
diff --git a/nitrocli/src/commands.rs b/nitrocli/src/commands.rs
index f0e0f6e..537a2cf 100644
--- a/nitrocli/src/commands.rs
+++ b/nitrocli/src/commands.rs
@@ -1,7 +1,7 @@
// commands.rs
// *************************************************************************
-// * Copyright (C) 2018-2019 Daniel Mueller (deso@posteo.net) *
+// * Copyright (C) 2018-2020 Daniel Mueller (deso@posteo.net) *
// * *
// * This program is free software: you can redistribute it and/or modify *
// * it under the terms of the GNU General Public License as published by *
@@ -949,11 +949,7 @@ pub fn pws_status(ctx: &mut args::ExecCtx<'_>, all: bool) -> Result<()> {
.get_slot_status()
.map_err(|err| get_error("Could not read PWS slot status", err))?;
println!(ctx, "slot\tname")?;
- for (i, &value) in slots
- .into_iter()
- .enumerate()
- .filter(|(_, &value)| all || value)
- {
+ for (i, &value) in slots.iter().enumerate().filter(|(_, &value)| all || value) {
print_pws_slot(ctx, &pws, i, value)?;
}
Ok(())
diff --git a/nitrocli/src/pinentry.rs b/nitrocli/src/pinentry.rs
index af28e2d..fd47657 100644
--- a/nitrocli/src/pinentry.rs
+++ b/nitrocli/src/pinentry.rs
@@ -1,7 +1,7 @@
// pinentry.rs
// *************************************************************************
-// * Copyright (C) 2017-2019 Daniel Mueller (deso@posteo.net) *
+// * Copyright (C) 2017-2020 Daniel Mueller (deso@posteo.net) *
// * *
// * This program is free software: you can redistribute it and/or modify *
// * it under the terms of the GNU General Public License as published by *
@@ -357,7 +357,7 @@ mod tests {
let response = "ERR ".to_string() + error + "\n";
let expected = error;
- let error = parse_pinentry_pin(response.to_string());
+ let error = parse_pinentry_pin(response);
if let Error::Error(ref e) = error.err().unwrap() {
assert_eq!(e, &expected);
diff --git a/nitrocli/src/tests/mod.rs b/nitrocli/src/tests/mod.rs
index 1e2fe26..5ebf285 100644
--- a/nitrocli/src/tests/mod.rs
+++ b/nitrocli/src/tests/mod.rs
@@ -1,7 +1,7 @@
// mod.rs
// *************************************************************************
-// * Copyright (C) 2019 Daniel Mueller (deso@posteo.net) *
+// * Copyright (C) 2019-2020 Daniel Mueller (deso@posteo.net) *
// * *
// * This program is free software: you can redistribute it and/or modify *
// * it under the terms of the GNU General Public License as published by *
@@ -139,10 +139,10 @@ impl Nitrocli {
F: FnOnce(&mut crate::RunCtx<'_>, Vec<String>) -> R,
{
let args = ["nitrocli"]
- .into_iter()
+ .iter()
.cloned()
.chain(self.model.map(Self::model_to_arg))
- .chain(args.into_iter().cloned())
+ .chain(args.iter().cloned())
.map(ToOwned::to_owned)
.collect();