Skip to content

Do not call Random for singletone lists - #564

Merged
snuyanzin merged 1 commit into
datafaker-net:mainfrom
snuyanzin:sl
Nov 28, 2022
Merged

snuyanzin merged 1 commit into
datafaker-net:mainfrom
snuyanzin:sl

Conversation

@snuyanzin

Copy link
Copy Markdown
Collaborator

There is no need to call random to pick a random element from list in case there is less than 2 elements

@codecov-commenter

codecov-commenter commented Nov 28, 2022

Copy link
Copy Markdown

Codecov Report

Merging #564 (ea661bc) into main (77806d3) will decrease coverage by 0.08%.
The diff coverage is 56.25%.

@@             Coverage Diff              @@
##               main     #564      +/-   ##
============================================
- Coverage     92.68%   92.60%   -0.09%     
  Complexity     2412     2412              
============================================
  Files           250      250              
  Lines          5047     5055       +8     
  Branches        543      546       +3     
============================================
+ Hits           4678     4681       +3     
- Misses          241      247       +6     
+ Partials        128      127       -1     
Impacted Files Coverage Δ
.../java/net/datafaker/service/FakeValuesService.java 86.69% <56.25%> (-0.63%) ⬇️
.../main/java/net/datafaker/service/FakerContext.java 89.74% <0.00%> (-2.57%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@snuyanzin
snuyanzin merged commit edcabda into datafaker-net:main Nov 28, 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.

2 participants