ifeq

Crates.ioifeq
lib.rsifeq
version0.1.3
sourcesrc
created_at2019-12-01 16:25:16.476089
updated_at2019-12-02 01:41:42.914529
descriptionInline if then as generics
homepagehttps://github.com/mezeipetister/ifeq
repositoryhttps://github.com/mezeipetister/ifeq
max_upload_size
id185740
size4,405
Peter Mezei (mezeipetister)

documentation

README

IF_EQ

extern crate ifeq;
use ifeq::*;

assert_eq!(9.is(9).then_print("nine"), "nine");
assert_eq!(9.if_eq(9).then_print("nine"), "nine");
assert_eq!(9.if_eq(9).then(|| "nine"), "nine");
Commit count: 6

cargo fmt