-
Notifications
You must be signed in to change notification settings - Fork 1
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
refactor!: Various api changes #20
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All of them already had infallible implementations, yet were fallible.
Although the old name is more represenatative, the convention amongst other crates seems to be to not name it `try_parse`. My guess why, would be the fact that parsing anything is usually fallible.
They were already infallible so renaming them now represents that.
Strictly speaking, `TryFrom` is used for conversion between different types, yet it is used here for parsing.
Same change as the previous commit. `TryFrom` is normally used to implement conversion between types, yet was used for parsing here. `try_from_path` also got renamed to `from_path` because nothing else is prefixed with `try_`.
Should've been there from the start but was overlooked. :^)
It's now exported from the main crate directly.
A bit less code this way.
`ReadFileError` was a very specific error that could be combined into another error given a name change, so it got removed. `ReadBytesError` got renamed into `IoError`. This means that it can also be used when writing files fails (needed for downloading files). `FileParseError` got added. This one will be thrown instead of the two panics that were previously present in `File`. `FlatbufferError` now contains `InvalidFlatbufferError` instead of io error.
Welp, I was still on a previous version so my clippy missed this one.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
status: completed
Issue was resolved, or pull request was merged
type: refactor
Issue or pull request related to code refactoring
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Miscellaneous breaking API changes. I don't expect to make any more breaking changes from now on, until 0.1.0 releases to the public.
Changes are focused mostly on two big things
TryFrom
impl being used where it shouldn't have beenThere are also some fixes for clippy lints and a some changes to
ManifestError
. The changes toManifestError
object were necessary, because there were still some unwraps that couldn't be categorized.Some unused dependencies were also removed.