std_macro_extensions/cell/macro.rs
1/// Creates a new `Cell` instance.
2///
3/// This macro takes an expression and wraps it in a `Cell`, providing interior mutability for the given value.
4/// The `Cell` type allows for mutation of its contents even when shared among multiple references.
5#[macro_export]
6macro_rules! cell {
7 ($val:expr) => {
8 std::cell::Cell::new($val)
9 };
10}