<div class="chatlog__message-group"> <div id="chatlog__message-container-679560114557943822" class="chatlog__message-container" data-message-id="679560114557943822"> <div class="chatlog__message"> <div class="chatlog__message-aside"><img class="chatlog__avatar" src="https://cdn.discordapp.com/avatars/429913902340636675/07e5ed361c9fa5ddc26ab81d07b2bc5b.png?size=512" alt="Avatar" loading="lazy"></div> <div class="chatlog__message-primary"> <div class="chatlog__header"><span class="chatlog__author" title="swiftbot#4647" data-user-id="429913902340636675">swiftbot</span> <span class="chatlog__author-tag">BOT</span> <a href="/channels/430242233468452865?category=main&channel=swiftbot-sandbox&message_id=679560114557943822"><span class="chatlog__timestamp" title="Wednesday, February 19, 2020 5:29 AM"></span></a><a href="#chatlog__message-container-679560114557943822">2/19/2020 5:29 AM</a></div> <div class="chatlog__content chatlog__markdown"><span class="chatlog__edited-timestamp" title="Wednesday, February 19, 2020 5:32 AM">(edited)</span></div> <div class="chatlog__embed"> <div class="chatlog__embed-color-pill chatlog__embed-color-pill--default"></div> <div class="chatlog__embed-content-container"> <div class="chatlog__embed-content"> <div class="chatlog__embed-text"> <div class="chatlog__embed-author-container"> <div class="chatlog__embed-author">nanasi</div> </div> <div class="chatlog__embed-description"> <div class="chatlog__markdown chatlog__markdown-preserve"><code class="chatlog__markdown-pre chatlog__markdown-pre--multiline language-swift">enum EnumValue: Hashable { case a(Int) case b(Int) } enum EnumValue2: Hashable { case a(Int) case b(Int) func hash(into hasher: inout Hasher) { switch self { case .a(let v): hasher.combine(0) hasher.combine(v) case .b(let v): hasher.combine(1) hasher.combine(v) } } } print(5.hashValue) print(EnumValue.a(5).hashValue) print(EnumValue.b(5).hashValue) print(EnumValue2.a(5).hashValue) print(EnumValue2.b(5).hashValue)</code></div> </div> <div class="chatlog__embed-fields"> <div class="chatlog__embed-field"> <div class="chatlog__embed-field-name"> <div class="chatlog__markdown chatlog__markdown-preserve">Version:</div> </div> <div class="chatlog__embed-field-value"> <div class="chatlog__markdown chatlog__markdown-preserve"><code class="chatlog__markdown-pre chatlog__markdown-pre--multiline nohighlight">swift-5.1.3-RELEASE</code></div> </div> </div> <div class="chatlog__embed-field"> <div class="chatlog__embed-field-name"> <div class="chatlog__markdown chatlog__markdown-preserve">Output:</div> </div> <div class="chatlog__embed-field-value"> <div class="chatlog__markdown chatlog__markdown-preserve"><code class="chatlog__markdown-pre chatlog__markdown-pre--multiline nohighlight">3666440306759404138 7344323318427966468 4893249820943752864 7344323318427966468 4893249820943752864</code></div> </div> </div> <div class="chatlog__embed-field"> <div class="chatlog__embed-field-name"> <div class="chatlog__markdown chatlog__markdown-preserve">Error:</div> </div> <div class="chatlog__embed-field-value"> <div class="chatlog__markdown chatlog__markdown-preserve"><code class="chatlog__markdown-pre chatlog__markdown-pre--multiline nohighlight"></code></div> </div> </div> </div> </div> </div> <div class="chatlog__embed-footer"><span class="chatlog__embed-footer-text"> 2/19/2020 5:32 AM </span></div> </div> </div> </div> </div> </div> </div>