greyblake / nutype

Rust newtype with guarantees 🇺🇦 🦀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor: match_feature

greyblake opened this issue · comments

From #39 (comment)

Introduce match_feature! macro:

let msg = match_feature!("foo",
    on => "Foo is on!",
    off => "Foo is off",
);

Refactor the existing code to use it.