Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 1.59 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: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • timglabisch/rust_yolo
    21 0 3
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • timglabisch

Rust Yolo

this crate allows using yolo instead of the unwrap function for Option and Result<T, E> example:

extern crate yolo;
use yolo::Yolo;

fn get_result(v : i32) -> Result<i32, ()> {
  Ok(v)
}

fn main() {
  assert_eq!(Some(123).yolo(), 123);
  assert_eq!(get_result(123).yolo(), 123);

  println!("hello world!");
}

installation

use

[dependencies]
yolo = "*"

make sure you DONT'T pin it to a version -> YOLO!.

special thanks

special thanks to matthiasendler who recognized how important this crate is