Skip to content

Commit

Permalink
Bump minimum version and rerun clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed May 23, 2024
1 parent 97b89aa commit f61744d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- rust: stable
- rust: beta
- rust: nightly
- rust: 1.56.0
- rust: 1.73.0
steps:
- uses: actions/checkout@v2
- name: Install rust
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = "structured access to the output of `cargo metadata`"
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.56.0"
rust-version = "1.73.0"

[dependencies]
camino = { version = "1.0.7", features = ["serde1"] }
Expand Down
9 changes: 2 additions & 7 deletions src/dependency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ use derive_builder::Builder;
use semver::VersionReq;
use serde::{Deserialize, Deserializer, Serialize};

#[derive(Eq, PartialEq, Clone, Debug, Copy, Hash, Serialize, Deserialize)]
#[derive(Eq, PartialEq, Clone, Debug, Copy, Hash, Serialize, Deserialize, Default)]
/// Dependencies can come in three kinds
pub enum DependencyKind {
#[serde(rename = "normal")]
#[default]
/// The 'normal' kind
Normal,
#[serde(rename = "dev")]
Expand All @@ -25,12 +26,6 @@ pub enum DependencyKind {
Unknown,
}

impl Default for DependencyKind {
fn default() -> DependencyKind {
DependencyKind::Normal
}
}

impl fmt::Display for DependencyKind {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let s = serde_json::to_string(self).unwrap();
Expand Down
9 changes: 2 additions & 7 deletions src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ pub struct ArtifactProfile {
}

/// The kind of debug information included in the artifact.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
#[non_exhaustive]
pub enum ArtifactDebuginfo {
/// No debug information.
#[default]
None,
/// Line directives only.
LineDirectivesOnly,
Expand All @@ -55,12 +56,6 @@ pub enum ArtifactDebuginfo {
UnknownString(String),
}

impl Default for ArtifactDebuginfo {
fn default() -> Self {
ArtifactDebuginfo::None
}
}

impl ser::Serialize for ArtifactDebuginfo {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
Expand Down

0 comments on commit f61744d

Please sign in to comment.