Skip to content

Commit

Permalink
raise msrv to 1.64.0
Browse files Browse the repository at this point in the history
Unless cargo version resolution respects rust-version in Cargo.toml,
it is tricky to control the required MSRV. Happy to lower it again if
we can upgrade dependencies and avoid raising the MSRV.
  • Loading branch information
ducaale committed May 17, 2023
1 parent 5ed5d9a commit dc843f7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.57.0 # minimum supported rust version
toolchain: 1.64.0 # minimum supported rust version
target: ${{ matrix.job.target }}
override: true
- uses: Swatinem/rust-cache@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.57.0 # minimum supported rust version
toolchain: 1.64.0 # minimum supported rust version
target: ${{ matrix.job.target }}
override: true
- uses: actions-rs/cargo@v1
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "xh"
version = "0.18.0"
authors = ["ducaale <sharaf.13@hotmail.com>"]
edition = "2021"
rust-version = "1.57.0"
rust-version = "1.64.0"
license = "MIT"
description = "Friendly and fast tool for sending HTTP requests"
documentation = "https://github.com/ducaale/xh"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ iwr -useb https://raw.githubusercontent.com/ducaale/xh/master/install.ps1 | iex
| Windows | Scoop | `scoop install xh` |
| Windows | Chocolatey | `choco install xh` |

\* Make sure that you have Rust 1.57 or later installed
\* Make sure that you have Rust 1.64 or later installed

\*\* To install the module pick one of these [releases](https://github.com/Magisk-Modules-Alt-Repo/xhhttp/releases)

Expand Down
18 changes: 4 additions & 14 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -906,19 +906,14 @@ fn generate_manpages(mut _app: clap::Command, _rest_args: Vec<String>) -> Error
)
}

#[derive(ArgEnum, Copy, Clone, Debug, PartialEq, Eq)]
#[derive(Default, ArgEnum, Copy, Clone, Debug, PartialEq, Eq)]
pub enum AuthType {
#[default]
Basic,
Bearer,
Digest,
}

impl Default for AuthType {
fn default() -> Self {
AuthType::Basic
}
}

#[derive(ArgEnum, Debug, PartialEq, Eq, Clone, Copy)]
pub enum Pretty {
/// (default) Enable both coloring and formatting
Expand Down Expand Up @@ -1178,19 +1173,14 @@ impl fmt::Display for Verify {
}
}

#[derive(Debug, PartialEq, Eq, Copy, Clone)]
#[derive(Default, Debug, PartialEq, Eq, Copy, Clone)]
pub enum BodyType {
#[default]
Json,
Form,
Multipart,
}

impl Default for BodyType {
fn default() -> Self {
BodyType::Json
}
}

#[derive(Debug)]
pub enum HttpVersion {
Http10,
Expand Down

0 comments on commit dc843f7

Please sign in to comment.