Skip to content

Instantly share code, notes, and snippets.

@Cynede
Created November 7, 2013 08:40
Show Gist options
  • Select an option

  • Save Cynede/7351205 to your computer and use it in GitHub Desktop.

Select an option

Save Cynede/7351205 to your computer and use it in GitHub Desktop.
fn ifV<'a, T : Star>(rc : &str, star: &'a T) -> Option<&'a Star> {
if (Path::new( rc )).exists() {
Some(star as &'a Star)
} else { None }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment