Skip to content

Commit

Permalink
fix(clippy): fix derivable_impls
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo committed Apr 20, 2023
1 parent 065b680 commit 6730e9b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/api/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,15 @@ struct Document {
highlight: elastic::ResponseHighlight,
}

#[derive(Deserialize)]
#[derive(Deserialize, Default)]
#[serde(rename_all = "lowercase")]
enum Sort {
#[default]
Best,
Relevance,
Popularity,
}

impl Default for Sort {
fn default() -> Self {
Sort::Best
}
}

#[derive(Deserialize)]
struct Params {
q: String,
Expand Down

0 comments on commit 6730e9b

Please sign in to comment.