Skip to content

Commit

Permalink
fix: derive Default instead of manually implementing it
Browse files Browse the repository at this point in the history
  • Loading branch information
izyuumi committed Jul 9, 2024
1 parent 0bce354 commit 77299ad
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub struct Sort {
}

/// Represents a query with a collection of parameters that define specific conditions and sorting orders.
#[derive(Debug)]
#[derive(Debug, Default)]
pub struct Query {
/// A map where each key-value pair represents a column and the condition or sorting order applied to it.
params: HashMap<String, String>,
Expand Down Expand Up @@ -277,15 +277,6 @@ impl std::fmt::Display for Filter {
}
}

// implementation of the query builder
impl Default for Query {
fn default() -> Self {
Self {
params: HashMap::new(),
}
}
}

impl Query {
/// Constructs a new `Query` instance using the default settings.
///
Expand Down

0 comments on commit 77299ad

Please sign in to comment.