From f2a06ddf4bcee9a12721cf1fceec2a8c30fdbc67 Mon Sep 17 00:00:00 2001 From: Marshall Pierce <575695+marshallpierce@users.noreply.github.com> Date: Sat, 26 Aug 2023 05:32:23 -0600 Subject: [PATCH] Misc cleanups - Tweak TryFrom usage - Add beta to CI to catch clippy changes sooner - Apply updated MSRV to clippy.toml --- .circleci/config.yml | 1 + RELEASE-NOTES.md | 5 +++++ clippy.toml | 2 +- src/alphabet.rs | 6 +++--- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 79d534c..9e4b9ce 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,6 +22,7 @@ workflows: '__msrv__', # won't add any other toolchains, just uses what's in the docker image '1.60.0', # minimum needed to build dev-dependencies 'stable', + 'beta', 'nightly' ] diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 485d979..51c1616 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,3 +1,8 @@ +# 0.21.3 + +- Implement `source` instead of `cause` on Error types +- Roll back MSRV to 1.48.0 so Debian can continue to live in a time warp + # 0.21.2 - Rollback MSRV to 1.57.0 -- only dev dependencies need 1.60, not the main code diff --git a/clippy.toml b/clippy.toml index 23b32c1..11d46a7 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1 +1 @@ -msrv = "1.57.0" +msrv = "1.48.0" diff --git a/src/alphabet.rs b/src/alphabet.rs index 848c77d..f7cd819 100644 --- a/src/alphabet.rs +++ b/src/alphabet.rs @@ -1,8 +1,7 @@ //! Provides [Alphabet] and constants for alphabets commonly used in the wild. use crate::PAD_BYTE; -use core::convert::TryFrom; -use core::fmt; +use core::{convert, fmt}; #[cfg(any(feature = "std", test))] use std::error; @@ -125,7 +124,7 @@ impl Alphabet { } } -impl TryFrom<&str> for Alphabet { +impl convert::TryFrom<&str> for Alphabet { type Error = ParseAlphabetError; fn try_from(value: &str) -> Result { @@ -203,6 +202,7 @@ pub const BIN_HEX: Alphabet = Alphabet::from_str_unchecked( #[cfg(test)] mod tests { use crate::alphabet::*; + use core::convert::TryFrom as _; #[test] fn detects_duplicate_start() {