summary refs log tree commit diff stats
path: root/lib/std/editdistance.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/editdistance.nim')
-rw-r--r--lib/std/editdistance.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/editdistance.nim b/lib/std/editdistance.nim
index 9f29c5c05..40c0017ae 100644
--- a/lib/std/editdistance.nim
+++ b/lib/std/editdistance.nim
@@ -10,7 +10,7 @@
 ## This module implements an algorithm to compute the
 ## `edit distance`:idx: between two Unicode strings.
 
-import unicode
+import std/unicode
 
 proc editDistance*(a, b: string): int {.noSideEffect.} =
   ## Returns the **unicode-rune** edit distance between `a` and `b`.
@@ -18,7 +18,7 @@ proc editDistance*(a, b: string): int {.noSideEffect.} =
   ## This uses the `Levenshtein`:idx: distance algorithm with only a linear
   ## memory overhead.
   runnableExamples: static: doAssert editdistance("Kitten", "Bitten") == 1
-  if len(a) > len(b):
+  if runeLen(a) > runeLen(b):
     # make `b` the longer string
     return editDistance(b, a)
   # strip common prefix