Skip to content

Instantly share code, notes, and snippets.

Sven Nilsen bvssvni

Block or report user

Report or block bvssvni

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bvssvni / gist:9674632
Last active Sep 24, 2019
A Rust Chain Macro
View gist:9674632
//! Chain macro in Rust
//! A typical usage is to avoid nested match expressions.
//! Supports:
//! - Pattern matching
//! - Or expressions (A | B => ...)
//! - Guarded statements (x if <cond> => ...)
//! - Implicit else (requires all arms to return same type)
You can’t perform that action at this time.