| Crates.io | expect_soft |
| lib.rs | expect_soft |
| version | 0.1.2 |
| created_at | 2023-09-29 16:14:52.682771+00 |
| updated_at | 2025-04-14 19:25:56.269143+00 |
| description | DEPRECATED, ARCHIVED, UNSUPPORTED. See readme for more information |
| homepage | |
| repository | https://github.com/modtk/expect_soft |
| max_upload_size | |
| id | 987560 |
| size | 11,331 |
This library has been retired in favor of Rust's native
set_hook.
A small utility that was designed to provide a softer alternative to Rust's .expect() method. Instead of panicking, it prints an error message and exits the program. This was made before I knew about the set_hook built-in function.
use expect_soft::ExpectSoft;
use std::fs;
fn main() {
fs::read_to_string("./readme.md").expect_soft("readme.md could not be found");
}