Registry / utility / if-chain

if-chain

JSON →
library1.0.3rscratesunverified

Macro for writing nested `if let` expressions.

# Cargo.toml [dependencies] if_chain = "1.0.3"
INSTALL
IMPORT
SIG · IF-CHAIN
I
if-chain
utilityrustv1.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

if_chain
use if_chain::if_chain;

Chains multiple if-let patterns without deep nesting.

use if_chain::if_chain; let x = Some(42); let y = Some("hello"); if_chain! { if let Some(a) = x; if let Some(b) = y; then { println!("Got {} and {}", a, b); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
if-chain — cargo add if-chain · libregistry