mirror of
https://github.com/Mercantec-GHC/h4-projekt-gruppe-0-sm.git
synced 2025-04-28 00:34:06 +02:00
16 lines
173 B
Plaintext
16 lines
173 B
Plaintext
|
|
enum S {
|
|
A(int),
|
|
B { v: int },
|
|
}
|
|
|
|
fn main() {
|
|
let s = S::A(123);
|
|
let r = match s {
|
|
S::A(v) => { 3 + 2 },
|
|
S::B { v: v } => { 4 },
|
|
};
|
|
}
|
|
|
|
|