Skip to content

Commit

Permalink
Bump MSRV to 1.60, migrate to Rust 2021
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed Nov 3, 2024
1 parent 7930792 commit 357d7be
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to Rust's notion of
[Semantic Versioning](https://semver.org/spec/v2.0.0.html). All versions prior
to 1.0.0 are beta releases.

## Unreleased
- MSRV has been increased to 1.56.0
- Bumped `secrecy` crate to 0.10

## [0.5.1] - 2024-08-31
### Fixed
- Client requests are now correctly percent-encoded when necessary.
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ readme = "README.md"
keywords = ["passphrase", "password"]
categories = ["api-bindings", "command-line-interface"]
license = "MIT OR Apache-2.0"
edition = "2018"
edition = "2021"
rust-version = "1.60"

[dependencies]
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.51.0"
channel = "1.60.0"
components = ["clippy", "rustfmt"]
4 changes: 2 additions & 2 deletions src/assuan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ mod read {
use super::Response;

fn gpg_error_code(input: &str) -> IResult<&str, u16> {
map(digit1, |code| {
let full = u32::from_str_radix(code, 10).expect("have decimal digits");
map(digit1, |code: &str| {
let full = code.parse::<u32>().expect("have decimal digits");
// gpg uses the lowest 16 bits for error codes.
full as u16
})(input)
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
//! ```
// Catch documentation errors caused by code changes.
#![deny(broken_intra_doc_links)]
#![deny(rustdoc::broken_intra_doc_links)]
#![deny(missing_docs)]

use secrecy::SecretString;
Expand Down Expand Up @@ -84,7 +84,7 @@ impl<'a> PassphraseInput<'a> {
///
/// Returns `None` if `pinentry` cannot be found in `PATH`.
pub fn with_default_binary() -> Option<Self> {
Self::with_binary("pinentry".to_owned())
Self::with_binary("pinentry")
}

/// Creates a new PassphraseInput using the given path to, or name of, a `pinentry`
Expand Down Expand Up @@ -265,7 +265,7 @@ impl<'a> ConfirmationDialog<'a> {
///
/// Returns `None` if `pinentry` cannot be found in `PATH`.
pub fn with_default_binary() -> Option<Self> {
Self::with_binary("pinentry".to_owned())
Self::with_binary("pinentry")
}

/// Creates a new ConfirmationDialog using the given path to, or name of, a `pinentry`
Expand Down Expand Up @@ -390,7 +390,7 @@ impl<'a> MessageDialog<'a> {
///
/// Returns `None` if `pinentry` cannot be found in `PATH`.
pub fn with_default_binary() -> Option<Self> {
Self::with_binary("pinentry".to_owned())
Self::with_binary("pinentry")
}

/// Creates a new MessageDialog using the given path to, or name of, a `pinentry`
Expand Down

0 comments on commit 357d7be

Please sign in to comment.