Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stevebeeblebrox/or_panic
Extract ok values from Rust results or panic with the contained error.
https://github.com/stevebeeblebrox/or_panic
Last synced: 28 days ago
JSON representation
Extract ok values from Rust results or panic with the contained error.
- Host: GitHub
- URL: https://github.com/stevebeeblebrox/or_panic
- Owner: SteveBeeblebrox
- License: mit
- Created: 2024-02-17T22:14:46.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-17T22:27:18.000Z (11 months ago)
- Last Synced: 2024-02-17T23:24:23.627Z (11 months ago)
- Language: Rust
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# or_panic
Extract ok values from Rust results or panic with the contained error. This works with any error type that implements `Display`.
```rust
use or_panic::OrPanic as _;println!("{:?}", Path::new("./foo.txt").canonicalize().or_panic());
```