is-match

Crates.iois-match
lib.rsis-match
version0.1.0
sourcesrc
created_at2017-05-03 19:06:47.867234
updated_at2017-05-03 19:06:47.867234
descriptionLibrary to check whether something matches something else
homepage
repositoryhttps://github.com/matthiasbeyer/is-match
max_upload_size
id12976
size18,222
Matthias Beyer (matthiasbeyer)

documentation

README

is-match

A mini crate to check whether something matches something else:

let value = some_function_call();

if is_match!(value, Ok(Some(EnumFoo::ComplexThing { Some(_), .. })) | Ok(Some(EnumFoo::Bar(_)))) {
  /* do things */
}

License

This project was extracted from imag at commit c74c26ccd143d905c94ecf84ac423293b7170623 where only I was the author of this file. imag itself is licensed as LGPL2.1, but I'm relicensing this piece of code as MPL 2.0 here.

See LICENSE - MPL 2.0

Commit count: 0

cargo fmt