Skip to content

Instantly share code, notes, and snippets.

@richo
Created March 29, 2014 08:56
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 richo/9851011 to your computer and use it in GitHub Desktop.
Save richo/9851011 to your computer and use it in GitHub Desktop.
impl Repository {
fn path(&self) -> Option<~str> {
unsafe {
let path = git_repository_path(self.repo);
match CString::new(path, true).as_str() {
Some(s) => return Some(s.to_owned()),
None => return None
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment