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

Remove unsed trait #7

Merged
merged 1 commit into from
Feb 7, 2022
Merged

Remove unsed trait #7

merged 1 commit into from
Feb 7, 2022

Conversation

wangzhen11aaa
Copy link
Contributor

@wangzhen11aaa wangzhen11aaa commented Feb 7, 2022

Remove unsed trait.
Will we add this Clone trait without any cost?

Remove unsed trait

Multi-line description of commit,
feel free to be detailed.

We can remove the Clone trait.
@skyzh
Copy link
Owner

skyzh commented Feb 7, 2022

Indeed, Copy requires Clone, so this change indeed takes no effect :)

https://doc.rust-lang.org/src/core/marker.rs.html#383-385

Adding Clone trait won't add significant cost, from my perspective.

@wangzhen11aaa
Copy link
Contributor Author

Indeed, Copy requires Clone, so this change indeed takes no effect :)

https://doc.rust-lang.org/src/core/marker.rs.html#383-385

Adding Clone trait won't add significant cost, from my perspective.

Ok, I'll see. I think Clone coupled with Copy is something like thought inertia. :D

@wangzhen11aaa
Copy link
Contributor Author

Indeed, Copy requires Clone, so this change indeed takes no effect :)
https://doc.rust-lang.org/src/core/marker.rs.html#383-385
Adding Clone trait won't add significant cost, from my perspective.

Ok, I'll see. I think Clone coupled with Copy is something like thought inertia. :D

#[derive(Copy, Clone, Debug, PartialEq)]
What's more, for Clone is the supertrait of Copy, then It is a good inertia, maybe.

@skyzh
Copy link
Owner

skyzh commented Feb 7, 2022

Yes, I think I was impacted by the derive inertia. Sounds reasonable not to + Clone here.

@skyzh skyzh merged commit 7a57c5c into skyzh:master Feb 7, 2022
@skyzh
Copy link
Owner

skyzh commented Feb 7, 2022

Oops, the commit title on main branch looks weird. I’ll do a force push tomorrow to fix it.

skyzh pushed a commit that referenced this pull request Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants