diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd6de09..5839005 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: jobs: build_and_test: runs-on: ubuntu-22.04 - container: rust:1.60 + container: rust:1.75 steps: - uses: actions/checkout@v4 - run: cargo build diff --git a/CHANGELOG.md b/CHANGELOG.md index f7843ad..a805013 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ Possible log types: ### Unreleased -- [changed] Require at least Rust 1.60 +- [changed] Require at least Rust 1.75 ### V0.9.0 (2023-05-07) diff --git a/Cargo.toml b/Cargo.toml index 369816e..adf356c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ include = [ "AUTHORS.md", ] edition = "2021" -rust-version = "1.60" +rust-version = "1.75" [dependencies] log = "^0.4" diff --git a/README.md b/README.md index d6d2874..fcc0db7 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ serialization and deserialization to/from JSON using Serde. - Crate Documentation: https://docs.rs/spaceapi/ - SpaceAPI Documentation: https://spaceapi.io/pages/docs.html -This library requires Rust 1.60.0 or newer. +This library requires Rust 1.75 or newer. ## Usage diff --git a/clippy.toml b/clippy.toml index 13f202e..cc4ad18 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1 +1 @@ -msrv = "1.60" +msrv = "1.75" diff --git a/src/status.rs b/src/status.rs index 30ec96b..03a179a 100644 --- a/src/status.rs +++ b/src/status.rs @@ -197,10 +197,11 @@ pub struct Link { pub url: String, } -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(Serialize, Deserialize, Default, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub enum BillingInterval { Yearly, + #[default] Monthly, Weekly, Daily, @@ -208,12 +209,6 @@ pub enum BillingInterval { Other, } -impl Default for BillingInterval { - fn default() -> Self { - BillingInterval::Monthly - } -} - #[derive(Serialize, Deserialize, Default, Debug, Clone, PartialEq)] pub struct MembershipPlan { pub name: String, @@ -310,19 +305,14 @@ impl Status { } } -#[derive(Debug, Copy, Clone, Eq, PartialEq)] +#[derive(Default, Debug, Copy, Clone, Eq, PartialEq)] enum StatusBuilderVersion { + #[default] V0_13, V14, Mixed, } -impl Default for StatusBuilderVersion { - fn default() -> StatusBuilderVersion { - StatusBuilderVersion::V0_13 - } -} - /// Builder for the `Status` object. #[derive(Default, Debug, Clone)] pub struct StatusBuilder {