Skip to content

Commit ea10f3b

Browse files
authored
base64ct: bump edition to 2024 (MSRV 1.85); add back to workspace (#1839)
We kept `base64ct` out of the toplevel workspace because we can't run tests on it with its previous MSRV of 1.81 because that compiler can't recognize the newer edition on all of the other crates in the workspace. We originally attempted this upgrade in #1670 but reverted it in #1702 due to complaints we received in #1695. Now that the needed MSRV of 1.85 is `N-2` of the current 1.87 stable, we can hopefully perform this upgrade without receiving as many complaints. Several other crates have bumped edition to 2024 already, and edition upgrades are a time when MSRV bumps like this should be expected.
1 parent ea64351 commit ea10f3b

File tree

9 files changed

+36
-230
lines changed

9 files changed

+36
-230
lines changed

.github/workflows/base64ct.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
matrix:
2525
rust:
26-
- 1.81.0 # MSRV
26+
- 1.85.0 # MSRV
2727
- stable
2828
target:
2929
- thumbv7em-none-eabi
@@ -47,7 +47,7 @@ jobs:
4747
strategy:
4848
matrix:
4949
rust:
50-
- 1.81.0 # MSRV
50+
- 1.85.0 # MSRV
5151
- stable
5252
steps:
5353
- uses: actions/checkout@v4

Cargo.lock

+18-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+5-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resolver = "2"
33
members = [
44
"base16ct",
55
"base32ct",
6-
#"base64ct",
6+
"base64ct",
77
"cmpv2",
88
"cms",
99
"const-oid",
@@ -27,9 +27,6 @@ members = [
2727
"x509-cert/test-support",
2828
"x509-ocsp"
2929
]
30-
exclude = [
31-
"base64ct",
32-
]
3330

3431
[profile.dev]
3532
opt-level = 2
@@ -65,7 +62,7 @@ x509-ocsp = { path = "./x509-ocsp" }
6562

6663
# https://github.com/RustCrypto/signatures/pull/913
6764
# https://github.com/RustCrypto/signatures/pull/923
68-
ecdsa = { git = "https://github.com/RustCrypto/signatures.git" }
65+
ecdsa = { git = "https://github.com/RustCrypto/signatures.git" }
6966
rfc6979 = { git = "https://github.com/RustCrypto/signatures.git" }
7067
# https://github.com/RustCrypto/key-wraps/pull/34
7168
# https://github.com/RustCrypto/key-wraps/pull/35
@@ -78,10 +75,10 @@ ansi-x963-kdf = { git = "https://github.com/RustCrypto/KDFs.git" }
7875

7976

8077
# https://github.com/RustCrypto/traits/pull/1777
81-
crypto-common = { git = "https://github.com/RustCrypto/traits.git" }
78+
crypto-common = { git = "https://github.com/RustCrypto/traits.git" }
8279
elliptic-curve = { git = "https://github.com/RustCrypto/traits.git" }
83-
signature = { git = "https://github.com/RustCrypto/traits.git" }
84-
aead = { git = "https://github.com/RustCrypto/traits.git" }
80+
signature = { git = "https://github.com/RustCrypto/traits.git" }
81+
aead = { git = "https://github.com/RustCrypto/traits.git" }
8582

8683
# https://github.com/RustCrypto/RSA/pull/478
8784
# https://github.com/RustCrypto/RSA/pull/504

base64ct/Cargo.lock

-204
This file was deleted.

base64ct/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "base64ct"
3-
version = "1.7.3"
3+
version = "1.8.0-pre"
44
description = """
55
Pure Rust implementation of Base64 (RFC 4648) which avoids any usages of
66
data-dependent branches/LUTs and thereby provides portable "best effort"
@@ -14,8 +14,8 @@ repository = "https://github.com/RustCrypto/formats"
1414
categories = ["cryptography", "encoding", "no-std", "parser-implementations"]
1515
keywords = ["crypto", "base64", "pem", "phc"]
1616
readme = "README.md"
17-
edition = "2021"
18-
rust-version = "1.81"
17+
edition = "2024"
18+
rust-version = "1.85"
1919

2020
[dev-dependencies]
2121
base64 = "0.22"

base64ct/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fixed-width line wrapping.
4343

4444
## Minimum Supported Rust Version
4545

46-
This crate requires **Rust 1.81** at a minimum.
46+
This crate requires **Rust 1.85** at a minimum.
4747

4848
We may change the MSRV in the future, but it will be accompanied by a minor
4949
version bump.
@@ -72,7 +72,7 @@ dual licensed as above, without any additional terms or conditions.
7272
[build-image]: https://github.com/RustCrypto/formats/actions/workflows/base64ct.yml/badge.svg
7373
[build-link]: https://github.com/RustCrypto/formats/actions/workflows/base64ct.yml
7474
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
75-
[rustc-image]: https://img.shields.io/badge/rustc-1.81+-blue.svg
75+
[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg
7676
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
7777
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/300570-formats
7878

base64ct/src/decoder.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
//! Buffered Base64 decoder.
22
33
use crate::{
4-
encoding,
5-
line_ending::{CHAR_CR, CHAR_LF},
64
Encoding,
75
Error::{self, InvalidLength},
8-
MIN_LINE_WIDTH,
6+
MIN_LINE_WIDTH, encoding,
7+
line_ending::{CHAR_CR, CHAR_LF},
98
};
109
use core::{cmp, marker::PhantomData};
1110

@@ -545,7 +544,7 @@ impl<'i> Iterator for LineReader<'i> {
545544
#[cfg(test)]
546545
#[allow(clippy::unwrap_used)]
547546
mod tests {
548-
use crate::{alphabet::Alphabet, test_vectors::*, Base64, Base64Unpadded, Decoder};
547+
use crate::{Base64, Base64Unpadded, Decoder, alphabet::Alphabet, test_vectors::*};
549548

550549
#[cfg(feature = "std")]
551550
use {alloc::vec::Vec, std::io::Read};

base64ct/src/encoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ impl LineWrapper {
306306
#[cfg(test)]
307307
#[allow(clippy::unwrap_used)]
308308
mod tests {
309-
use crate::{alphabet::Alphabet, test_vectors::*, Base64, Base64Unpadded, Encoder, LineEnding};
309+
use crate::{Base64, Base64Unpadded, Encoder, LineEnding, alphabet::Alphabet, test_vectors::*};
310310

311311
#[test]
312312
fn encode_padded() {

base64ct/src/test_vectors.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ pub(crate) const UNPADDED_BIN: &[u8] = &[
2020
];
2121

2222
/// Padded multi-line Base64 example (from the `ssh-key` crate's `id_ed25519`)
23-
pub(crate) const MULTILINE_PADDED_BASE64: &str =
24-
"b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\n\
23+
pub(crate) const MULTILINE_PADDED_BASE64: &str = "b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\n\
2524
QyNTUxOQAAACCzPq7zfqLffKoBDe/eo04kH2XxtSmk9D7RQyf1xUqrYgAAAJgAIAxdACAM\n\
2625
XQAAAAtzc2gtZWQyNTUxOQAAACCzPq7zfqLffKoBDe/eo04kH2XxtSmk9D7RQyf1xUqrYg\n\
2726
AAAEC2BsIi0QwW2uFscKTUUXNHLsYX4FxlaSDSblbAj7WR7bM+rvN+ot98qgEN796jTiQf\n\
@@ -42,8 +41,7 @@ pub(crate) const MULTILINE_PADDED_BIN: &[u8] = &[
4241
];
4342

4443
/// Unpadded multi-line Base64 example (from the `ssh-key` crate's `id_ecdsa_p256`).
45-
pub(crate) const MULTILINE_UNPADDED_BASE64: &str =
46-
"b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAaAAAABNlY2RzYS\n\
44+
pub(crate) const MULTILINE_UNPADDED_BASE64: &str = "b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAaAAAABNlY2RzYS\n\
4745
1zaGEyLW5pc3RwMjU2AAAACG5pc3RwMjU2AAAAQQR8H9hzDOU0V76NkkCY7DZIgw+Sqooj\n\
4846
Y6xlb91FIfpjE+UR8YkbTp5ar44ULQatFaZqQlfz8FHYTooOL5G6gHBHAAAAsB8RBhUfEQ\n\
4947
YVAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHwf2HMM5TRXvo2S\n\

0 commit comments

Comments
 (0)