Skip to content

Return nil from Iteration#perform#418

Merged
sambostock merged 1 commit into
mainfrom
return-nil-from-perform
Aug 18, 2023
Merged

Return nil from Iteration#perform#418
sambostock merged 1 commit into
mainfrom
return-nil-from-perform

Conversation

@sambostock

Copy link
Copy Markdown
Contributor

perform should be treated as void, with consumers not coupling to its return value.

Explicitly returning nil ensures the return value does not change if we happen to change the implementation.

@sambostock sambostock requested a review from Mangara August 18, 2023 20:46
Comment thread lib/job-iteration/iteration.rb Outdated
@sambostock sambostock force-pushed the return-nil-from-perform branch from 14c6839 to ae05f81 Compare August 18, 2023 20:50
Comment thread lib/job-iteration/iteration.rb Outdated
`perform` should be treated as `void`, with consumers not coupling to
its return value.

Explicitly returning `nil` ensures the return value does not change if
we happen to change the implementation.
@sambostock sambostock force-pushed the return-nil-from-perform branch from ae05f81 to 0395d2f Compare August 18, 2023 21:35
@sambostock sambostock merged commit 20ff243 into main Aug 18, 2023
@sambostock sambostock deleted the return-nil-from-perform branch August 18, 2023 22:01
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