blob: 2e4667b916cdaf9cab1dd235e890dd0ba23672e3 [file] [log] [blame]
#![feature(guard_patterns)]
fn main() {
match user.subscription_plan() {
(Plan::Regular if user.credit() >= 100) | (Plan::Premium if user.credit() >= 80) => {
// Complete the transaction.
}
_ => {
// The user doesn't have enough credit, return an error message.
}
}
}