Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

2 participants