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

Implement TryAsRef<ForwardToLeader<..>> for RaftError #1087

Closed
HaHa421 opened this issue Apr 6, 2024 · 3 comments
Closed

Implement TryAsRef<ForwardToLeader<..>> for RaftError #1087

HaHa421 opened this issue Apr 6, 2024 · 3 comments
Labels
good first issue Good for newcomers

Comments

@HaHa421
Copy link
Contributor

HaHa421 commented Apr 6, 2024

Is your feature request related to a problem? Please describe.
this eases client implementation

Describe the solution you'd like
merged and backported

Describe alternatives you've considered
None

Additional context

impl<NID, N , E> TryAsRef<ForwardToLeader<NID, N>> for RaftError<NID, E>
where
    NID: NodeId,
    N: Node,
    E: Debug + TryAsRef<ForwardToLeader<NID, N>>,
{
    fn try_as_ref(&self) -> Option<&ForwardToLeader<NID, N>> {
        self.forward_to_leader()
    }
}
Copy link

github-actions bot commented Apr 6, 2024

👋 Thanks for opening this issue!

Get help or engage by:

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

@drmingdrmer
Copy link
Member

Make sense. Would you open a PR for it? :)

@drmingdrmer drmingdrmer added the good first issue Good for newcomers label Apr 7, 2024
@drmingdrmer
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants