Skip to content

Instantly share code, notes, and snippets.

@willmurphyscode
Last active November 22, 2016 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willmurphyscode/236837dd8edf61cf8070b28daa62339d to your computer and use it in GitHub Desktop.
Save willmurphyscode/236837dd8edf61cf8070b28daa62339d to your computer and use it in GitHub Desktop.
//src/main.rs
mod rectangle;
mod point;
fn main() {
println!("Hello, world!");
}
//src/point.rs
#[derive(Debug)]
pub struct Point {
x: i32,
y: i32
}
//src/rectangle.rs
use point::Point;
#[derive(Debug)]
pub struct Rectangle {
lower_left : Point,
upper_right : Point
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment