Skip to content

abvalatouski/its-ok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

A macro for replacing ? with unwrap.

Resources

License

Stars

Watchers

Forks

Languages