-
Notifications
You must be signed in to change notification settings - Fork 2
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
Remove unneeded Debug
trait requirement from BasicSnippet
and DeprecatedSnippet
#82
base: master
Are you sure you want to change the base?
Conversation
a88be68
to
7486a0b
Compare
Debug
trait requirement from BasicSnippet
Debug
trait requirement from BasicSnippet
and DeprecatedSnippet
Does this trait requirement interfere with anything? Do the |
7486a0b
to
7fe2499
Compare
I see two arguments for removing
|
In the end, this is your codebase; do as you see fit. |
|
I guess my opinion is more based on aesthetics and how I think you should inspect values of this type. Aesthetically I don't like to impose trait bounds that are not needed, and I think that you should inspect the the type of a snippet through its entrypoint name, not through its debug output. |
If that is the case, then how about the following? impl Debug for dyn BasicSnippet {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.entrypoint())
}
} This would also allow the |
Your suggestion works. But I should also like to point out that no |
What about removal of line 35 in |
You're right. It got removed from higher-order snippets. |
No description provided.