Skip to content

Instantly share code, notes, and snippets.

@cnd
Created November 7, 2013 08:40
Show Gist options
  • Save cnd/7351205 to your computer and use it in GitHub Desktop.
Save cnd/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