Skip to content

Instantly share code, notes, and snippets.

@narodnik
Created April 28, 2020 20:26
Show Gist options
  • Save narodnik/79948e4dbae0bdae239b124d61bec983 to your computer and use it in GitHub Desktop.
Save narodnik/79948e4dbae0bdae239b124d61bec983 to your computer and use it in GitHub Desktop.
struct Network {
}
struct Handshake<'a> {
net: &'a Network
}
struct Foo<'a> {
net: Network,
hs: Handshake<'a>
}
impl<'a> Foo<'a> {
fn new() -> Self {
let net = Network {};
Self {
net,
hs: Handshake { net: &net }
}
}
}
fn main() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment