Skip to content

Commit 9435319

Browse files
committed
Change normalize_index(..., length: Int) -> UInt
Signed-off-by: martinvuyk <[email protected]>
1 parent a88172f commit 9435319

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mojo/stdlib/src/collections/_index_normalization.mojo

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ fn normalize_index[
9595
@always_inline
9696
fn normalize_index[
9797
I: Indexer, //, container_name: StaticString
98-
](idx: I, length: Int) -> Int:
98+
](idx: I, length: Int) -> UInt:
9999
"""Normalize the given index value to a valid index value for the given container length.
100100
101101
If the provided value is negative, the `index + container_length` is returned.
@@ -111,4 +111,4 @@ fn normalize_index[
111111
Returns:
112112
The normalized index value.
113113
"""
114-
return Int(normalize_index[container_name](idx, UInt(length)))
114+
return normalize_index[container_name](idx, UInt(length))

0 commit comments

Comments
 (0)