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 std::fmt::Display and std::error::Error for exposed error types #57

Merged
merged 11 commits into from
Feb 1, 2024

Conversation

lexika979
Copy link
Contributor

This change allows users of raknet to use eyre and anyhow to propagate the errors upwards using the ? operator:

async fn smth() -> eyre::Result<()> {
    // These work now:
    let mut listener = Listener::bind("0.0.0.0:1234").await?;
    listener.start().await?;
    
    Ok(())
}

@john-bv
Copy link
Member

john-bv commented Jan 31, 2024

Looks good, i'll look more in depth later today!

@john-bv john-bv changed the base branch from master to dev February 1, 2024 23:23
@john-bv john-bv merged commit db79e7b into NetrexMC:dev Feb 1, 2024
4 checks passed
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