diff --git a/stdlib/test/utils/test_string_slice.mojo b/stdlib/test/utils/test_string_slice.mojo index 2e65601816..1a47a96a5b 100644 --- a/stdlib/test/utils/test_string_slice.mojo +++ b/stdlib/test/utils/test_string_slice.mojo @@ -488,10 +488,10 @@ def test_splitlines(): def test_iter(): - vs = "123" + vs = StringSlice("123") # Borrow immutably - fn conc(vs: StringLiteral) -> String: + fn conc(vs: StringSlice) -> String: var c = String("") for v in iter(vs): c += v @@ -505,8 +505,7 @@ def test_iter(): assert_equal(321, atol(concat)) idx = -1 - vs = "mojošŸ”„" - for item in vs: + for item in StringSlice("mojošŸ”„"): idx += 1 if idx == 0: assert_equal("m", item)