Skip to content

Commit

Permalink
Rust 2021 edition upgrade
Browse files Browse the repository at this point in the history
Most of the crates in this repository were already MSRV 1.55 to take
advantage of non-`Copy`/`Default` array constructors using the new
const-generic `map` constructor.

However, now that the 2021 edition is out, it would be a shame to bump
to 1.55 instead of 1.56 when we're bumping MSRV anyway.

This commit bumps `edition = "2021"`, also adding the new
`rust-version = "1.56"` Cargo.toml attribute to properly signal MSRV.

All crates have been checked using `cargo fix --edition`, however no
attempts have yet been made at upgrading edition idioms.
  • Loading branch information
tarcieri committed Oct 21, 2021
1 parent c27c702 commit 61d782d
Show file tree
Hide file tree
Showing 50 changed files with 220 additions and 137 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/base64ct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -43,7 +43,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/const-oid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/der.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
rust:
- 1.55.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
# 32-bit Linux
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.55.0 # MSRV
rust: 1.56.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
Expand All @@ -62,15 +62,15 @@ jobs:
# 64-bit Linux
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.55.0 # MSRV
rust: 1.56.0 # MSRV
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
rust: stable

# 64-bit Windows
- target: x86_64-pc-windows-msvc
platform: windows-latest
rust: 1.55.0 # MSRV
rust: 1.56.0 # MSRV
- target: x86_64-pc-windows-msvc
platform: windows-latest
rust: stable
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pem-rfc7468.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -44,7 +44,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkcs1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
rust:
- 1.55.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -46,7 +46,7 @@ jobs:
strategy:
matrix:
rust:
- 1.55.0 # MSRV
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkcs5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
rust:
- 1.55.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -52,7 +52,7 @@ jobs:
strategy:
matrix:
rust:
- 1.55.0 # MSRV
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkcs8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
matrix:
rust:
- 1.55.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
strategy:
matrix:
rust:
- 1.55.0 # MSRV
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sec1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
rust:
- 1.55.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -51,7 +51,7 @@ jobs:
strategy:
matrix:
rust:
- 1.55.0 # MSRV
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/security-audit.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/spki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
rust:
- 1.55.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -49,7 +49,7 @@ jobs:
strategy:
matrix:
rust:
- 1.55.0 # MSRV
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tls_codec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- wasm32-unknown-unknown
Expand All @@ -47,15 +47,15 @@ jobs:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: 1.51.0 # MSRV
rust: 1.56.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib

# 64-bit Linux
- target: x86_64-unknown-linux-gnu
rust: 1.51.0 # MSRV
rust: 1.56.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.55.0
toolchain: 1.56.0
components: clippy
override: true
profile: minimal
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/x509.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: x509
on:
pull_request:
paths:
- "const-oid/**"
- "der/**"
- "spki/**"
- "x509/**"
Expand All @@ -24,7 +25,7 @@ jobs:
strategy:
matrix:
rust:
- 1.55.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -44,7 +45,7 @@ jobs:
strategy:
matrix:
rust:
- 1.55.0 # MSRV
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions base64ct/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
[package]
name = "base64ct"
version = "1.1.1" # Also update html_root_url in lib.rs when bumping this
version = "1.2.0-pre" # Also update html_root_url in lib.rs when bumping this
description = """
Pure Rust implementation of Base64 (RFC 4648) which avoids any usages of
data-dependent branches/LUTs and thereby provides portable "best effort"
constant-time operation and embedded-friendly no_std support
"""
authors = ["RustCrypto Developers"]
license = "Apache-2.0 OR MIT"
edition = "2018"
documentation = "https://docs.rs/base64ct"
repository = "https://github.com/RustCrypto/formats/tree/master/base64ct"
categories = ["cryptography", "encoding", "no-std", "parser-implementations"]
keywords = ["crypto", "base64", "pem", "phc"]
readme = "README.md"
edition = "2021"
rust-version = "1.56"

[features]
alloc = []
Expand Down
4 changes: 2 additions & 2 deletions base64ct/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ to practically extract RSA private keys from SGX enclaves.

## Minimum Supported Rust Version

This crate requires **Rust 1.55** at a minimum.
This crate requires **Rust 1.56** at a minimum.

We may change the MSRV in the future, but it will be accompanied by a minor
version bump.
Expand Down Expand Up @@ -65,7 +65,7 @@ dual licensed as above, without any additional terms or conditions.
[build-image]: https://github.com/RustCrypto/formats/actions/workflows/base64ct.yml/badge.svg
[build-link]: https://github.com/RustCrypto/formats/actions/workflows/base64ct.yml
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.51+-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/300570-formats

Expand Down
4 changes: 2 additions & 2 deletions base64ct/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//!
//! # Minimum Supported Rust Version
//!
//! This crate requires **Rust 1.55** at a minimum.
//! This crate requires **Rust 1.56** at a minimum.
//!
//! We may change the MSRV in the future, but it will be accompanied by a minor
//! version bump.
Expand Down Expand Up @@ -84,7 +84,7 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg",
html_root_url = "https://docs.rs/base64ct/1.1.1"
html_root_url = "https://docs.rs/base64ct/1.2.0-pre"
)]
#![warn(missing_docs, rust_2018_idioms)]

Expand Down

0 comments on commit 61d782d

Please sign in to comment.