Skip to content

Instantly share code, notes, and snippets.

@simias
Created May 3, 2015 14:48
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 simias/e31e5e4346ca6969fb20 to your computer and use it in GitHub Desktop.
Save simias/e31e5e4346ca6969fb20 to your computer and use it in GitHub Desktop.
impl GdbRemote {
fn send_reply(&mut self, reply: Reply) -> Result<(), ()> {
match self.remote.write(&reply.into_packet()) {
//...
}
}
}
impl Reply {
pub fn into_packet(mut self) -> Vec<u8> {
// ...
self.data
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment