summaryrefslogtreecommitdiff
path: root/tests/test.rs
blob: c2d1091467c16409f3fa998c6208c3534e517958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
fn main() {
    println!("Hello, world!");
}

fn add(a: i32, b: i32) -> i32 {
    a + b
}

struct Point {
    x: f64,
    y: f64,
}

enum Direction {
    Up,
    Down,
    Left,
    Right,
}

trait Describe {
    fn describe(&self) -> String;
}

impl Describe for Point {
    fn describe(&self) -> String {
        format!("Point at ({}, {})", self.x, self.y)
    }
}

const MAX_POINTS: u32 = 100;