Skip to content

Commit

Permalink
Address clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
ahlinc committed Jan 31, 2024
1 parent 69e2370 commit 3119b6c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/jsonrpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mod response;
mod router;

/// A unique ID used to correlate requests and responses together.
#[derive(Clone, Debug, Eq, Hash, PartialEq, Deserialize, Serialize)]
#[derive(Default, Clone, Debug, Eq, Hash, PartialEq, Deserialize, Serialize)]
#[serde(untagged)]
pub enum Id {
/// Numeric ID.
Expand All @@ -33,15 +33,10 @@ pub enum Id {
/// While `null` is considered a valid request ID by the JSON-RPC 2.0 specification, its use is
/// _strongly_ discouraged because the specification also uses a `null` value to indicate an
/// unknown ID in the [`Response`] object.
#[default]
Null,
}

impl Default for Id {
fn default() -> Self {
Id::Null
}
}

impl Display for Id {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {
Expand Down

0 comments on commit 3119b6c

Please sign in to comment.