summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2020-09-05 10:39:46 -0400
committerrsiddharth <s@ricketyspace.net>2020-09-05 10:39:46 -0400
commit44f0fd653e2fa0fd2e0a4d067a335bba2cd21525 (patch)
tree0062528f2506661fc759a2b17f1ef561f2498adc /lib
parentaa9f08f51abee3e0857d82f3d45ec3bd58420de7 (diff)
lib: update HammingDistance
lib/hamming.go (HammingDistance): Change type of arguments to []byte.
Diffstat (limited to 'lib')
-rw-r--r--lib/hamming.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hamming.go b/lib/hamming.go
index b2c46e9..1e53d54 100644
--- a/lib/hamming.go
+++ b/lib/hamming.go
@@ -9,7 +9,7 @@ func init() {
rand.Seed(42)
}
-func HammingDistance(a, b string) int {
+func HammingDistance(a, b []byte) int {
if len(a) != len(b) {
return -1 // Fail.
}