Skip to content

Conversation

@chrispappas
Copy link
Contributor

@chrispappas chrispappas commented Aug 31, 2022

  • previously if the filter matched nothing, []T(nil) would be returned, rather than an actual empty slice []T{}
  • this is because we weren't initializing the out return value, so if nothing matched the filter, it would just return the default value of nil
  • add Example and "No Matches" tests

* previously if the filter matched nothing, []T(nil) would be returned, rather than an actual empty slice []T{}
* add Example and "No Matches" tests
@chrispappas chrispappas changed the title Ensure that the out return param is initialized Ensure that the out return param is initialized in Filter methods Aug 31, 2022
@chrispappas chrispappas changed the title Ensure that the out return param is initialized in Filter methods Ensure that Filter methods return empty slice when nothing matches Sep 1, 2022
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