From a475bd6ad711fa436f0f857951a30d8e6cf4d76d Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Mon, 2 Sep 2019 11:32:29 -0700 Subject: Bump required Rust version to 1.32 This change bumps the Rust version we require from 1.31 to 1.32. This version adds -- among other things -- support for Self struct constructors. Such support will be a requirement for an indirect (dev) dependency that we will require as part of an upcoming change. --- nitrocli/CHANGELOG.md | 5 +++++ nitrocli/README.md | 2 +- nitrocli/ci/gitlab-ci.yml | 4 ++-- nitrocli/src/commands.rs | 6 +----- nitrocli/src/tests/mod.rs | 4 ++-- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/nitrocli/CHANGELOG.md b/nitrocli/CHANGELOG.md index 1e9ab94..e042cbc 100644 --- a/nitrocli/CHANGELOG.md +++ b/nitrocli/CHANGELOG.md @@ -1,3 +1,8 @@ +Unreleased +---------- +- Bumped required Rust version to `1.32` + + 0.3.0 ----- - Added `unencrypted` command with `set` subcommand for changing the diff --git a/nitrocli/README.md b/nitrocli/README.md index 7e15425..ec145f2 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.32+-blue.svg)](https://blog.rust-lang.org/2019/01/17/Rust-1.32.0.html) nitrocli ======== diff --git a/nitrocli/ci/gitlab-ci.yml b/nitrocli/ci/gitlab-ci.yml index 76ee517..8895128 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/edda09581f7c015c5cc2b8f0e04951a83b6f9727/1.32.0/stretch/Dockerfile +image: "rust:1.32.0" build-test:cargo: script: diff --git a/nitrocli/src/commands.rs b/nitrocli/src/commands.rs index a046ec8..86a66df 100644 --- a/nitrocli/src/commands.rs +++ b/nitrocli/src/commands.rs @@ -938,11 +938,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/tests/mod.rs b/nitrocli/src/tests/mod.rs index bc76d6d..dc15117 100644 --- a/nitrocli/src/tests/mod.rs +++ b/nitrocli/src/tests/mod.rs @@ -153,10 +153,10 @@ impl Nitrocli { F: FnOnce(&mut crate::RunCtx<'_>, Vec) -> 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(); -- cgit v1.2.3