Skip to content

Commit

Permalink
fix detail
Browse files Browse the repository at this point in the history
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
  • Loading branch information
martinvuyk committed Dec 10, 2024
1 parent da50923 commit 3095ae6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stdlib/src/collections/list.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,8 @@ struct List[T: CollectionElement, hint_trivial_type: Bool = False](
if stop_normalized < 0:
stop_normalized += len(self)

start_normalized = max(start_normalized, min(0, len(self)))
stop_normalized = max(stop_normalized, min(0, len(self)))
start_normalized = max(0, min(start_normalized, len(self)))
stop_normalized = max(0, min(stop_normalized, len(self)))

for i in range(start_normalized, stop_normalized):
if self[i] == value:
Expand Down

0 comments on commit 3095ae6

Please sign in to comment.