Skip to content

Commit 2b91cfc

Browse files
authored
Soft-deprecate this crate (#25)
1 parent ec9f7f7 commit 2b91cfc

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
[![CI](https://github.com/lambda-fairy/if_chain/actions/workflows/ci.yml/badge.svg)](https://github.com/lambda-fairy/if_chain/actions/workflows/ci.yml) [![Cargo](https://img.shields.io/crates/v/if_chain.svg)](https://crates.io/crates/if_chain)
44

5+
**If you're using Rust 1.88 or newer, check out [`if let` chains](https://blog.rust-lang.org/2025/06/26/Rust-1.88.0/#let-chains) instead. This crate is still available for earlier versions of Rust.**
6+
57
This crate provides a single macro called `if_chain!`.
68

79
`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.

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
//! This crate provides a single macro called `if_chain!`.
22
//!
3+
//! **If you're using Rust 1.88 or newer, check out [`if let` chains][rust] instead.
4+
//! This crate is still available for earlier versions of Rust.**
5+
//!
36
//! `if_chain!` lets you write long chains of nested `if` and `if let`
47
//! statements without the associated rightward drift. It also supports multiple
58
//! patterns (e.g. `if let Foo(a) | Bar(a) = b`) in places where Rust would
69
//! normally not allow them.
710
//!
811
//! See the associated [blog post] for the background behind this crate.
912
//!
13+
//! [rust]: https://blog.rust-lang.org/2025/06/26/Rust-1.88.0/#let-chains
1014
//! [blog post]: https://lambda.xyz/blog/if-chain
1115
//!
1216
//! # Note about recursion limits

0 commit comments

Comments
 (0)