-
-
Notifications
You must be signed in to change notification settings - Fork 330
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
Deduplicate OnDisk Corpus #2827
base: main
Are you sure you want to change the base?
Conversation
/// An input for the target | ||
#[cfg(not(feature = "std"))] | ||
pub trait Input: Clone + Serialize + serde::de::DeserializeOwned + Debug { | ||
pub trait Input: Clone + Serialize + serde::de::DeserializeOwned + Debug + Hash { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't add this. We want to keep the trait bounds as minimal as possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic behind this is that people just need to implement Hash
to their custom inputs now instead of generate_name()
. The name of the testcase will then be the hash of the contents of the input, which is one of the things proposed in #2434
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. but we just want to avoid any other traits bounds being added to this pub trait Input
.
(unless it is really really really necessary)
what you can do is remove generate_name() from this trait
then make a public
pub fn generate_name<I: Hash>(input: I) -> String {
// do your stuff
}
then call it from other places.
addresses #2434
Original PR (now closed) #2802