Skip to content

Commit

Permalink
fix(clippy): fix derivable_impls (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo authored Apr 20, 2023
1 parent 804a954 commit 4860b43
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 4860b43

Please sign in to comment.