Skip to content

Remove thiserror #20

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

Merged
merged 1 commit into from
Mar 16, 2025
Merged

Remove thiserror #20

merged 1 commit into from
Mar 16, 2025

Conversation

sile
Copy link
Owner

@sile sile commented Mar 16, 2025

Copilot Summary

This pull request includes several changes to error handling and error messages in the codebase. The most significant changes involve removing the thiserror dependency and implementing custom error formatting and conversion for various error types.

Error handling improvements:

  • src/channel.rs: Removed thiserror dependency and added custom implementations for std::fmt::Display and std::error::Error for SendError and RecvError enums.
  • src/epmd.rs: Removed thiserror dependency and added custom implementations for std::fmt::Display and std::error::Error for EpmdError enum.
  • src/handshake.rs: Removed thiserror dependency and added custom implementations for std::fmt::Display and std::error::Error for HandshakeError enum.
  • src/node.rs: Removed thiserror dependency and added custom implementations for std::fmt::Display and std::error::Error for NodeNameError enum.

Code simplification:

  • src/handshake.rs: Introduced constants PROTOCOL_VERSION and NODE_NAME_VERSION to replace hardcoded values, improving code readability and maintainability. [1] [2] [3] [4]

@sile sile merged commit a407725 into master Mar 16, 2025
9 checks passed
@sile sile deleted the remove-thiserror branch March 16, 2025 01:10
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.

1 participant