Closed nathansizemore closed 7 years ago
(x, y)
should be the name, i guess.
lazy_static! {
static ref FOO: (u8, u8) = (5, 6);
}
For a given
static ref NAME: TYPE = EXPR;
, the macro generates a unique type that implements Derefand stores it in a static with name NAME.
I could also use this.
Hi, I'm sincerely sorry for taking so long to respond.
lazy static mirrors the syntax of Rusts regular static
s, which do not allow pattern matching either. As such, I do not plan to add this feature, sorry. :)
Unless I just have the syntax wrong? I've tried both:
static (ref x, ref y): (u8, u8) = (5u8, 6u8);
static ref (x, y): (u8, u8) = (5u8, 6u8);