Skip to content

Commit

Permalink
Added PartialEq to the params structs
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Spencer <danrspen@gmail.com>
  • Loading branch information
danrspencer committed Jul 3, 2023
1 parent 5806a2d commit e3b9a0e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions kube-core/src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub enum VersionMatch {
}

/// Common query parameters used in list/delete calls on collections
#[derive(Clone, Debug, Default)]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ListParams {
/// A selector to restrict the list of returned objects by their labels.
///
Expand Down Expand Up @@ -208,7 +208,7 @@ impl ListParams {
}

/// Common query parameters used in get calls
#[derive(Clone, Debug, Default)]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct GetParams {
/// An explicit resourceVersion with implicit version matching strategies
///
Expand Down Expand Up @@ -276,7 +276,7 @@ impl ValidationDirective {
}

/// Common query parameters used in watch calls on collections
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq)]
pub struct WatchParams {
/// A selector to restrict returned objects by their labels.
///
Expand Down Expand Up @@ -404,7 +404,7 @@ impl WatchParams {
}

/// Common query parameters for put/post calls
#[derive(Default, Clone, Debug)]
#[derive(Default, Clone, Debug, PartialEq)]
pub struct PostParams {
/// Whether to run this as a dry run
pub dry_run: bool,
Expand Down Expand Up @@ -631,7 +631,7 @@ impl PatchParams {
}

/// Common query parameters for delete calls
#[derive(Default, Clone, Serialize, Debug)]
#[derive(Default, Clone, Serialize, Debug, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct DeleteParams {
/// When present, indicates that modifications should not be persisted.
Expand Down Expand Up @@ -799,7 +799,7 @@ mod test {
}

/// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
#[derive(Default, Clone, Serialize, Debug)]
#[derive(Default, Clone, Serialize, Debug, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct Preconditions {
/// Specifies the target ResourceVersion
Expand All @@ -811,7 +811,7 @@ pub struct Preconditions {
}

/// Propagation policy when deleting single objects
#[derive(Clone, Debug, Serialize)]
#[derive(Clone, Debug, Serialize, PartialEq)]
pub enum PropagationPolicy {
/// Orphan dependents
Orphan,
Expand Down

0 comments on commit e3b9a0e

Please sign in to comment.