Skip to content

improve iterators3 to demonstrate collect() type-driven behavior#2333

Open
leochen4891 wants to merge 1 commit intorust-lang:mainfrom
leochen4891:improve_iterator3
Open

improve iterators3 to demonstrate collect() type-driven behavior#2333
leochen4891 wants to merge 1 commit intorust-lang:mainfrom
leochen4891:improve_iterator3

Conversation

@leochen4891
Copy link

@leochen4891 leochen4891 commented Jan 17, 2026

  • No change to the existing solution
  • Use simpler numbers for easier mental math (9, 12, 18, 6 ÷ 3)
  • Add function parameters to allow testing different inputs
  • Add error case tests to show fail-fast vs process-all behavior
  • Enhance comments explaining Result<Vec> vs Vec<Result>

  - Use simpler numbers for easier mental math (9, 12, 18, 6 ÷ 3)
  - Add function parameters to allow testing different inputs
  - Add error case tests to show fail-fast vs process-all behavior
  - Enhance comments explaining Result<Vec<T>> vs Vec<Result<T>>
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