Skip to content
Commit Detail

Commit adbf24c

Author
James M Snell <jsnell@cloudflare.com> 2025-12-10 17:11:02 -0800
Parents
36e75cd
Tree
7258863
Add IoContext::tryCurrent()

A common pattern throughout the codebase is to check if there
is a current IoContext via IoContext::hasCurrent() before
calling IoContext::current(). This change introduces
IoContext::tryCurrent() which returns a Maybe<IoContext&>
to simplify this pattern and eliminate and remove redundant
checks that are redundantly redundant.

Files changed