diff --git a/.circleci/config.yml b/.circleci/config.yml index 61ca82e..79d534c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ workflows: # be easier on the CI hosts since presumably those fat lower layers will already be cached, and # therefore faster than a minimal, customized alpine. # MSRV - 'rust:1.57.0' + 'rust:1.48.0' ] # a hacky scheme to work around CircleCI's inability to deal with mutable docker tags, forcing us to # get a nightly or stable toolchain via rustup instead of a mutable docker tag @@ -89,7 +89,7 @@ jobs: name: Build ARM with only alloc feature command: cargo build --target thumbv6m-none-eabi --no-default-features --features alloc - run: - # dev dependencies can't build on 1.57.0 + # dev dependencies can't build on 1.48.0 name: Run tests command: | if [[ '<< parameters.toolchain_override >>' != '__msrv__' ]] diff --git a/Cargo.toml b/Cargo.toml index 0eaff26..31414c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,9 +9,10 @@ readme = "README.md" keywords = ["base64", "utf8", "encode", "decode", "no_std"] categories = ["encoding"] license = "MIT OR Apache-2.0" -edition = "2021" +edition = "2018" # dev-dependencies require 1.60, but the main code doesn't -rust-version = "1.57.0" +# This option was added in 1.56, keep it for when we bump MSRV. +rust-version = "1.48.0" [[bench]] name = "benchmarks" diff --git a/README.md b/README.md index 925ee5e..f566756 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ optionally may allow other behaviors. ## Rust version compatibility -The minimum supported Rust version is 1.57.0. +The minimum supported Rust version is 1.48.0. # Contributing diff --git a/src/alphabet.rs b/src/alphabet.rs index 11f6eb4..848c77d 100644 --- a/src/alphabet.rs +++ b/src/alphabet.rs @@ -1,6 +1,7 @@ //! Provides [Alphabet] and constants for alphabets commonly used in the wild. use crate::PAD_BYTE; +use core::convert::TryFrom; use core::fmt; #[cfg(any(feature = "std", test))] use std::error; @@ -202,7 +203,6 @@ pub const BIN_HEX: Alphabet = Alphabet::from_str_unchecked( #[cfg(test)] mod tests { use crate::alphabet::*; - use std::convert::TryFrom as _; #[test] fn detects_duplicate_start() {