expect_soft 0.1.2

DEPRECATED, ARCHIVED, UNSUPPORTED. See readme for more information
Documentation
  • Coverage
  • 0%
    0 out of 4 items documented0 out of 3 items with examples
  • Size
  • Source code size: 10.85 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.07 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • modtk/expect_soft
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • rosidae

expect_soft

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");
}