-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3: add expect_macro r=killercup a=vitiral This PR adds the `expect!` macro, which is an ergonomic replacement for `unwrap()`/`expect()`. The main advantages are: - Prints the line number/column of the failure with a better error message. - Can specify format parameters (The type of `expect` is `expect(&str)`, so you have to use `&format!(...)`) - Error conditions are lazily evaluated.
- Loading branch information
Showing
2 changed files
with
5 additions
and
0 deletions.
There are no files selected for viewing
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
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