Skip to content

Use the new count rather than the array itself to determine the new length#5334

Open
SiliconA-Z wants to merge 1 commit intoswiftlang:mainfrom
SiliconA-Z:patch-4
Open

Use the new count rather than the array itself to determine the new length#5334
SiliconA-Z wants to merge 1 commit intoswiftlang:mainfrom
SiliconA-Z:patch-4

Conversation

@SiliconA-Z
Copy link
Copy Markdown
Contributor

@SiliconA-Z SiliconA-Z commented Dec 27, 2025

If the middle array element is remove for example, this code is wrong.

range.length = range.length - (idx - range.location) - 1; before updating range.location to idx is also a way to do this.

…ength

If the middle array element is remove for example, this code is wrong.
@SiliconA-Z
Copy link
Copy Markdown
Contributor Author

@parkera

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant