Skip to content

derive partialeq for progenitor types #493

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
8 changes: 1 addition & 7 deletions mg-admin-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ progenitor::generate_api!(
post_hook = (|log: &slog::Logger, result: &Result<_, _>| {
slog::trace!(log, "client response"; "result" => ?result);
}),
derives = [schemars::JsonSchema],
derives = [schemars::JsonSchema, PartialEq],
);

impl std::hash::Hash for types::Prefix4 {
Expand All @@ -25,12 +25,6 @@ impl std::hash::Hash for types::Prefix4 {
}
}

impl std::cmp::PartialEq for types::Prefix4 {
fn eq(&self, other: &Self) -> bool {
self.value.eq(&other.value) && self.length.eq(&other.length)
}
}

impl std::cmp::Eq for types::Prefix4 {}

impl Copy for types::Prefix4 {}
Expand Down