Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created January 16, 2021 20:46
Show Gist options
  • Save rust-play/2817eab94d571b3e567bee7897ec1b5f to your computer and use it in GitHub Desktop.
Save rust-play/2817eab94d571b3e567bee7897ec1b5f to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
struct<R1, R2> DoubleReport(R1, R2);
impl<R1: Report, R2: Report> Report for DoubleReport<R1, R2> {
fn report_method(&self, ..) {
self.0.report_method(..);
self.1.report_method(..);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment