Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ZIOAspect.identity #7934

Merged
merged 2 commits into from
Mar 22, 2023
Merged

Add ZIOAspect.identity #7934

merged 2 commits into from
Mar 22, 2023

Conversation

johnspade
Copy link
Contributor

@johnspade johnspade commented Mar 22, 2023

I calculate OpenTracing tags in library code, and sometimes it's more convenient to return a noop object from a condition rather than dealing with an Option/List. Empty/noop objects like this are often useful.

@johnspade johnspade marked this pull request as ready for review March 22, 2023 09:59
Copy link
Contributor

@adamgfraser adamgfraser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just one minor comment on naming.

core/shared/src/main/scala/zio/ZIOAspect.scala Outdated Show resolved Hide resolved
core/shared/src/main/scala/zio/ZIOAspect.scala Outdated Show resolved Hide resolved
Co-authored-by: Adam Fraser <adam.fraser@gmail.com>
@johnspade johnspade changed the title Add ZIOAspect.noop Add ZIOAspect.identity Mar 22, 2023
@adamgfraser adamgfraser merged commit 9ae4b54 into zio:series/2.x Mar 22, 2023
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.

None yet

2 participants