its_ok 0.1.0

A macro for replacing ? with unwrap.
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented3 out of 3 items with examples
  • Size
  • Source code size: 12.55 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 306.12 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • abvalatouski/its-ok
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • abvalatouski

its_ok

Provides ok and ok_unchecked macros for replacing ? with unwrap and unwrap_unchecked calls.

Example

use its_ok::ok;
use std::io::Write;

ok! {
    let mut buffer = Vec::new();
    buffer.write_all(b"bytes")?;
}

// The code above gets expanded into this.
let mut buffer = Vec::new();
buffer.write_all(b"bytes").unwrap();