Skip to content

Commit

Permalink
Bump MSRV to 1.65.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelmello committed Dec 29, 2023
1 parent 3135c88 commit ab3dc31
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- main

env:
MSRV: 1.63.0
MSRV: 1.65.0

jobs:
lint:
Expand Down
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
- Added 'with_answered_prompt_prefix' to RenderConfig to allow customization of answered prompt prefix.
- Revamped keybindings for DateSelect.


### Fixes

- Fixed typos in the code's comments.
Expand All @@ -39,7 +38,7 @@
- Upgraded underlying `termion` crate from v1.5 to v2.0.
- Upgraded underlying `bitflags` from v1 to v2, which affects the `Attributes` and `KeyModifiers` crates. If you use any of bitflag's methods directly, you might be affected, refer to the [bitflags changelog](https://github.com/bitflags/bitflags/releases/tag/2.0.0) for more information.
- Removed `thiserror` dependency in favor of implementing `InquireError` by hand. [#146](https://github.com/mikaelmello/inquire/issues/146)
- Raised MSRV to 1.63 due to requirements in downstream dependencies.
- Raised MSRV to 1.65 due to requirements in downstream dependencies.
- MSRV is now explicitly set in the package definition.
- Replaced `lazy_static` with `once_cell` as `once_cell::sync::Lazy` is being standardized and `lazy_static` is not actively maintained anymore.
- Added `fuzzy-matcher` as an optional dependency for fuzzy filtering in Select and MultiSelect prompts [#176](https://github.com/mikaelmello/inquire/pull/176)
Expand Down
2 changes: 1 addition & 1 deletion inquire/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = ["Mikael Mello <git@mikaelmello.com>"]
keywords = ["cli", "ask", "prompt", "question", "interactive"]
categories = ["command-line-interface", "value-formatting"]
include = ["/examples", "/src", "/../LICENSE"]
rust-version = "1.63.0"
rust-version = "1.65.0"

[lib]
name = "inquire"
Expand Down
12 changes: 2 additions & 10 deletions inquire/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,17 @@ use crate::{error::CustomUserError, list_option::ListOption};

/// Error message that is displayed to the users when their input is considered not
/// valid by registered validators.
#[derive(Clone, Debug, PartialEq, Eq)]
#[derive(Clone, Default, Debug, PartialEq, Eq)]
pub enum ErrorMessage {
/// No custom message is defined, a standard one defined in the set
/// [`RenderConfig`](crate::ui::RenderConfig) is used instead.
#[default]
Default,

/// Custom error message, used instead of the standard one.
Custom(String),
}

// Deriving an enum default was stabilized on v1.62 which would require us
// to bump the MSRV to 1.62.0.
#[allow(clippy::derivable_impls)]
impl Default for ErrorMessage {
fn default() -> Self {
ErrorMessage::Default
}
}

impl<T> From<T> for ErrorMessage
where
T: ToString,
Expand Down

0 comments on commit ab3dc31

Please sign in to comment.