|
|
|
|
|
by lambda
4685 days ago
|
|
That seems like a really bad example of pattern matching, as no pattern matching is going on; it's just using the guard statements, and so could be replaced with an if statement: let computed_key = if key.len() > self.block_size {
self.zero_pad(self.hash(key).digest)
} else if key.len() < self.block_size {
self.zero_pad(key)
} else {
key
}
|
|