diff options
| author | Max Audron <audron@cocaine.farm> | 2021-09-28 18:05:48 +0200 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2021-09-28 18:16:11 +0200 |
| commit | 25d4da290f48015fa6a06b6da8cf4ef1ceb147d5 (patch) | |
| tree | bf35f038465cae96bedecb0892588e5bb2ec699e /src/message/handshake | |
| parent | switch AliasManager to use split network translation traits (diff) | |
convert Init struct's methods to builder style
Diffstat (limited to '')
| -rw-r--r-- | src/message/handshake/init.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/message/handshake/init.rs b/src/message/handshake/init.rs index df1b29e..51514ff 100644 --- a/src/message/handshake/init.rs +++ b/src/message/handshake/init.rs @@ -15,12 +15,14 @@ impl Init { } } - pub fn compression(mut self, v: bool) { - self.compression = v + pub fn compression(mut self, v: bool) -> Self { + self.compression = v; + self } - pub fn tls(mut self, v: bool) { - self.tls = v + pub fn tls(mut self, v: bool) -> Self { + self.tls = v; + self } pub fn serialize(self) -> Vec<u8> { |
