mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-11 13:19:18 +00:00
Merge branch 'main' of https://github.com/blacktoast/rustlings into main
This commit is contained in:
commit
36b377587b
@ -6,12 +6,20 @@
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
enum Message {
|
enum Message {
|
||||||
// TODO: define the different variants used below
|
// TODO: define the different variants used below
|
||||||
|
Move{x:i32,y:i32},
|
||||||
|
Echo(String),
|
||||||
|
ChangeColor(i32,i32,i32),
|
||||||
|
Quit
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
impl Message {
|
impl Message {
|
||||||
fn call(&self) {
|
fn call(&self) {
|
||||||
println!("{:?}", &self);
|
println!("{:?}", &self);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user