With Swift 4.2, The Hashable protocol has been updated with a hash(into:) method that takes care of the hashing, instead of you rolling your own hashing calculation.
func hash(into hasher: inout Hasher) {
hasher.combine(uid)
hasher.combine(name)
hasher.combine(age)
}