Skip to content
New issue

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

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

Already on GitHub? # to your account

Manually impl Clone for Raft structure instead of using #[derive(Clone)] #870

Closed
xDarksome opened this issue Jun 16, 2023 · 2 comments · Fixed by #872
Closed

Manually impl Clone for Raft structure instead of using #[derive(Clone)] #870

xDarksome opened this issue Jun 16, 2023 · 2 comments · Fixed by #872
Assignees

Comments

@xDarksome
Copy link

#[derive(Clone)] puts Clone bounds on each type parameter.
So, currently Raft only implements Clone if Network and Storage implement Clone.

However, Raft uses Arc under the hood for all of its dependencies, so we should be able to impl Clone regardless.

Maybe it's been done by design as a future proofing, but my speculation is that it's just a small oversight.

@github-actions
Copy link

👋 Thanks for opening this issue!

Get help or engage by:

  • /help : to print help messages.
  • /assignme : to assign this issue to you.

@drmingdrmer drmingdrmer self-assigned this Jun 16, 2023
@drmingdrmer
Copy link
Member

Nice point! Let me fix it!

Thank you!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants