Skip to content

Instantly share code, notes, and snippets.

Created May 26, 2015 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/71e42bb1fe4e247528b5 to your computer and use it in GitHub Desktop.
Save anonymous/71e42bb1fe4e247528b5 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
pub struct Brick {
pub peer: Peer,
pub path: Path,
}
impl Brick{
pub fn as_str(&self) -> &'static str{
let s = self.peer.hostname.clone();
let ret_str = s + ":" + &self.path.to_str().unwrap();
return ret_str.as_str();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment