Skip to content

Commit 73082c2

Browse files
committed
Fix demo example for rust
1 parent 2f874c2 commit 73082c2

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

  • demo/rust_supervised_app/src

demo/rust_supervised_app/src/main.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,14 @@ struct Args {
3030

3131
#[derive(Debug, Copy, Clone)]
3232
enum Checks {
33-
One,
34-
Two,
35-
Three,
33+
One = 1,
34+
Two = 2,
35+
Three = 3,
3636
}
3737

3838
impl From<Checks> for u32 {
3939
fn from(val: Checks) -> Self {
40-
match val {
41-
Checks::One => 1,
42-
Checks::Two => 2,
43-
Checks::Three => 3,
44-
}
40+
val as u32
4541
}
4642
}
4743

0 commit comments

Comments
 (0)