Skip to content

Instantly share code, notes, and snippets.

fn linked_face(vertexes: &[Rc<RefCell<Vertex>>], face: UnlinkedFace) -> Option<RefCell<Face>> {
Some(RefCell::new(Face {
a: match vertexes.get(face.a) {
Some(x) => x.clone(),
None => return None
},
b: match vertexes.get(face.b) {
Some(x) => x.clone(),
None => return None
},