File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ import Foundation
1818private let i_2166136261 = Int ( bitPattern: 2166136261 )
1919private let i_16777619 = Int ( 16777619 )
2020
21- /// Computes the hash value of a message by visiting its fields recursively.
21+ /// Computes the hash of a message by visiting its fields recursively.
2222///
2323/// Note that because this visits every field, it has the potential to be slow
2424/// for large or deeply nested messages. Users who need to use such messages as
25- /// dictionary keys or set members should override `hashValue` in an extension
26- /// and provide a more efficient implementation by examining only a subset of
27- /// key fields.
25+ /// dictionary keys or set members can use a wrapper struct around the message
26+ /// and use a custom Hashable implementation that looks at the subset of the
27+ /// message fields they want to include .
2828internal struct HashVisitor : Visitor {
2929
3030 // Roughly based on FNV hash: http://tools.ietf.org/html/draft-eastlake-fnv-03
You can’t perform that action at this time.
0 commit comments