hcpl / if_chain

Macro for writing nested `if let` expressions

Home Page:https://docs.rs/if_chain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

if_chain

Build Status Cargo

This crate provides a single macro called if_chain!.

if_chain! lets you write long chains of nested if and if let statements without the associated rightward drift. It also supports multiple patterns (e.g. if let Foo(a) | Bar(a) = b) in places where Rust would normally not allow them.

For more information on this crate, see the documentation and associated blog post.

About

Macro for writing nested `if let` expressions

https://docs.rs/if_chain

License:Apache License 2.0


Languages

Language:Rust 100.0%