Skip to content

Commit

Permalink
Merge #1068
Browse files Browse the repository at this point in the history
1068: Upgrade sic to Rust edition 2021 r=foresterre a=foresterre

With a new edition also comes a new MSRV, namely Rust 1.56, the first release which added support for edition 2021.

In addition, the new MSRV is necessary for image 0.24:

image-rs/image#1433
https://github.com/image-rs/image/blob/master/CHANGES.md

Co-authored-by: Martijn Gribnau <garm@ilumeo.com>
  • Loading branch information
bors[bot] and foresterre committed Feb 1, 2022
2 parents f225659 + 4adaa06 commit 3e67df2
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 32 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,40 +55,35 @@ jobs:
continue-on-error: true
strategy:
matrix:
build: [msrv, stable, beta, nightly, macos, win-gnu, win-msvc]
build: [ubuntu-stable, ubuntu-beta, ubuntu-nightly, macos-stable, win-gnu-stable, win-msvc-stable]
include:
# pinned rust version :: ubuntu
- build: msrv
os: ubuntu-18.04
rust: 1.49.0

# latest rust stable :: ubuntu
- build: stable
- build: ubuntu-stable
os: ubuntu-latest
rust: stable

# latest rust beta :: ubuntu
- build: beta
- build: ubuntu-beta
os: ubuntu-latest
rust: beta

# latest rust nightly :: ubuntu
- build: nightly
- build: ubuntu-nightly
os: ubuntu-latest
rust: nightly

# latest rust stable :: mac_os
- build: macos
- build: macos-stable
os: macOS-latest
rust: stable

# latest rust stable :: windows + gnu
- build: win-gnu
- build: win-gnu-stable
os: windows-latest
rust: stable-x86_64-gnu

# latest rust stable :: windows + msvc
- build: win-msvc
- build: win-msvc-stable
os: windows-latest
rust: stable

Expand Down Expand Up @@ -223,6 +218,6 @@ jobs:
- name: install_cargo_msrv
run: cargo install cargo-msrv
- name: version_of_cargo_msrv
run: cargo msrv --version # as of writing: 0.7.0 (required for --verify)
run: cargo msrv --version # as of writing: 0.14.0 (required for verify subcommand)
- name: run_cargo_msrv
run: cargo msrv --verify --ignore-lockfile --output-format json
run: cargo msrv verify --ignore-lockfile --output-format json
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[package]
edition = "2018"
name = "sic"
version = "0.19.0"
authors = ["Martijn Gribnau <garm@ilumeo.com>"]
Expand All @@ -17,8 +16,8 @@ exclude = [
keywords = ["image", "converter", "cli", "front-end", "image-cli"]
categories = ["multimedia::images", "command-line-utilities"]

[package.metadata]
msrv = "1.49.0"
edition = "2021"
rust-version = "1.56"

[workspace]
members = [
Expand Down
13 changes: 6 additions & 7 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
status = [
"test (msrv)",
"test (stable)",
"test (beta)",
"test (nightly)",
"test (macos)",
"test (win-gnu)",
"test (win-msvc)",
"test (ubuntu-stable)",
"test (ubuntu-beta)",
"test (ubuntu-nightly)",
"test (macos-stable)",
"test (win-gnu-stable)",
"test (win-msvc-stable)",
"rustfmt",
"clippy",
"cargo_deny (advisories)",
Expand Down
6 changes: 5 additions & 1 deletion components/sic_cli_ops/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ name = "sic_cli_ops"
version = "0.19.0"
authors = ["Martijn Gribnau <garm@ilumeo.com>"]
description = "Component of the sic cli: parses images operations invoked from the cli."
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/foresterre/sic"
readme = "../../README.md"

edition = "2021"
rust-version = "1.56"


[dependencies]
sic_image_engine = { version = "0.19.0", path = "../../components/sic_image_engine" }
Expand Down
5 changes: 4 additions & 1 deletion components/sic_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ name = "sic_core"
version = "0.19.0"
authors = ["Martijn Gribnau <garm@ilumeo.com>"]
description = "Component of the sic cli: re-exports global dependencies to sub-crates."
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/foresterre/sic"
readme = "../../README.md"

edition = "2021"
rust-version = "1.56"

[dependencies]
image = { version = "0.23.14", features = ["avif"] }
Expand Down
5 changes: 4 additions & 1 deletion components/sic_image_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ name = "sic_image_engine"
version = "0.19.0"
authors = ["Martijn Gribnau <garm@ilumeo.com>"]
description = "Component of the sic cli: provides abstractions for (the application of) image operations."
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/foresterre/sic"
readme = "../../README.md"

edition = "2021"
rust-version = "1.56"

[dependencies]
sic_core = { version = "0.19.0", path = "../sic_core" }
Expand Down
5 changes: 4 additions & 1 deletion components/sic_io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ name = "sic_io"
version = "0.19.0"
authors = ["Martijn Gribnau <garm@ilumeo.com>"]
description = "Component of the sic cli: provides accessible i/o around image formats."
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/foresterre/sic"
readme = "../../README.md"

edition = "2021"
rust-version = "1.56"

[dependencies]
sic_core = { version = "0.19.0", path = "../sic_core"}
Expand Down
5 changes: 4 additions & 1 deletion components/sic_parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ name = "sic_parser"
version = "0.19.0"
authors = ["Martijn Gribnau <garm@ilumeo.com>"]
description = "Component of the sic cli: parser for the image operation script used by sic."
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/foresterre/sic"
readme = "../../README.md"

edition = "2021"
rust-version = "1.56"

[dependencies]
sic_core = { version = "0.19.0", path = "../sic_core"}
Expand Down
4 changes: 2 additions & 2 deletions components/sic_parser/src/value_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,14 +407,14 @@ mod tests_parse_from_iter {

macro_rules! assert_iter_impl {
($lhs_iter:expr, $rhs_iter:expr, $f:expr) => {
assert!($lhs_iter.into_iter().zip($rhs_iter.into_iter()).all($f));
assert!($lhs_iter.into_iter().zip($rhs_iter.into_iter()).all($f))
};
}

macro_rules! assert_iter_f32 {
($lhs_iter:expr, $rhs_iter:expr) => {
assert_iter_impl!($lhs_iter, $rhs_iter, |(l, r)| (l - r).abs()
< std::f32::EPSILON);
< std::f32::EPSILON)
};
}

Expand Down
5 changes: 4 additions & 1 deletion components/sic_testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ name = "sic_testing"
version = "0.19.0"
authors = ["Martijn Gribnau <garm@ilumeo.com>"]
description = "Component of the sic cli: provides commonly used testing operations for sic crates."
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/foresterre/sic"
readme = "../../README.md"

edition = "2021"
rust-version = "1.56"

[dependencies]
sic_core = { version = "0.19.0", path = "../sic_core" }
Expand Down

0 comments on commit 3e67df2

Please sign in to comment.