Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive PartialEq on core params structs #1237

Merged
merged 2 commits into from
Jul 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading