yolo

Crates.ioyolo
lib.rsyolo
version0.1.2
sourcesrc
created_at2016-02-08 21:33:06.164708
updated_at2016-02-08 21:43:46.657281
descriptionRusts .yolo()
homepagehttps://github.com/timglabisch/rust_yolo
repositoryhttps://github.com/timglabisch/rust_yolo.git
max_upload_size
id4130
size1,449
Tim Glabisch (timglabisch)

documentation

https://github.com/timglabisch/rust_yolo

README

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

Commit count: 10

cargo fmt