We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a88172f commit 9435319Copy full SHA for 9435319
mojo/stdlib/src/collections/_index_normalization.mojo
@@ -95,7 +95,7 @@ fn normalize_index[
95
@always_inline
96
fn normalize_index[
97
I: Indexer, //, container_name: StaticString
98
-](idx: I, length: Int) -> Int:
+](idx: I, length: Int) -> UInt:
99
"""Normalize the given index value to a valid index value for the given container length.
100
101
If the provided value is negative, the `index + container_length` is returned.
@@ -111,4 +111,4 @@ fn normalize_index[
111
Returns:
112
The normalized index value.
113
"""
114
- return Int(normalize_index[container_name](idx, UInt(length)))
+ return normalize_index[container_name](idx, UInt(length))
0 commit comments