Skip to content

Instantly share code, notes, and snippets.

@tbillington
Created August 5, 2014 04:11
Show Gist options
  • Save tbillington/9a44e0fde3c5d68bd761 to your computer and use it in GitHub Desktop.
Save tbillington/9a44e0fde3c5d68bd761 to your computer and use it in GitHub Desktop.
use std::rc::Rc;
struct Vertex {
x: f64,
y: f64,
z: f64,
}
struct Face {
a: Rc<Vertex>,
b: Rc<Vertex>,
c: Rc<Vertex>,
d: Rc<Vertex>,
}
fn main() {
let v = Rc::new(Vertex {x:1.5,y:1.5,z:1.5});
let x = Face {a:v.clone(),b:v.clone(),c:v.clone(),d:v.clone()};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment