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

Fix expectErr implementation #81

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Caleb-Hill
Copy link

This pull request does three things.

  • Fixes the type on expectErr in BaseResult
  • Adds expectErr tests in the ok and err test files.
  • Updates the Readme to call expectErr instead of expect

Fixes #74

@vultix is this repo still active?

The Rust `expect_err` method on which this is based has the type
`fn expect_err(self,msg: &str) -> E` meaning that it returns the
container `Error` type not the `Ok` type. This change corrects the type
signature on BaseResult so the package builds.

Also adds a missing semicolon in `ErrImpl`.
Tests check that expectErr leaves an `Err` result alone and throws the
provided error message for an `Ok` result.
Changes `expect` to `expectErr` in expectErr section of README.

I assume this was a copy paste error.
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.

Fix expectErr
1 participant