From e432ae3410d697f69ca751e1afa3d62a70402677 Mon Sep 17 00:00:00 2001 From: martinvuyk Date: Thu, 12 Dec 2024 21:21:27 -0300 Subject: [PATCH] add owned as suggested by @lsh Signed-off-by: martinvuyk --- stdlib/src/collections/string.mojo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/src/collections/string.mojo b/stdlib/src/collections/string.mojo index 3cc01c1ef5..46d078db9f 100644 --- a/stdlib/src/collections/string.mojo +++ b/stdlib/src/collections/string.mojo @@ -784,7 +784,7 @@ struct String( @always_inline @implicit - fn __init__(out self, impl: List[Byte, *_]): + fn __init__(out self, owned impl: List[Byte, *_]): """Construct a string from a buffer of null-terminated bytes, copying the allocated data. Use the transfer operator `^` to avoid the copy.