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

Changes to the library #1

Merged
merged 1 commit into from
Feb 16, 2024
Merged

Changes to the library #1

merged 1 commit into from
Feb 16, 2024

Conversation

dev-ardi
Copy link
Collaborator

@dev-ardi dev-ardi commented Feb 16, 2024

Motivation

This is the first crate that shows up when you search for "Rust DNI crate". It should be high quality.

Changes

Error enum

  • This PR introduces the thiserror crate to provide an idiomatic way to return errors. I assume that the author comes from a golang background but in Rust we have other patterns.
  • This allows the users of the crate to use the errors in a more fine-grained way while also having the a default display.
  • All of the exported functions now return a Result with this.

Refactors

Changed some patterns so that they are more rust-like

@jsgm
Copy link
Owner

jsgm commented Feb 16, 2024

Hi @dev-ardi!

I greatly appreciate your efforts and invite you to continue contributing to the repo.

I've just merged the pull request.

@jsgm jsgm merged commit 9d7d3a4 into jsgm:main Feb 16, 2024
1 check passed
@dev-ardi
Copy link
Collaborator Author

Thanks for merging, do you think you could make a release to crates.io?

@jsgm
Copy link
Owner

jsgm commented Feb 22, 2024

Thanks for merging, do you think you could make a release to crates.io?

Published!

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