Skip to content

Commit

Permalink
Update some kj::Maybe assignments from nullptr to kj::none (#2136)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed May 17, 2024
1 parent 5644724 commit a3a0f95
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/workerd/api/sql.c++
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ SqlStorage::Cursor::~Cursor() noexcept(false) {
KJ_IF_SOME(s, selfRef) {
KJ_IF_SOME(p, s) {
if (&p == this) {
s = nullptr;
s = kj::none;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/workerd/api/streams/queue.c++
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ ByteQueue::ByobRequest::~ByobRequest() noexcept(false) {

void ByteQueue::ByobRequest::invalidate() {
KJ_IF_SOME(req, request) {
req.byobReadRequest = nullptr;
request = nullptr;
req.byobReadRequest = kj::none;
request = kj::none;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/workerd/api/url-standard.c++
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ URL::URL(kj::StringPtr url, kj::Maybe<kj::StringPtr> base) : inner(parseImpl(url

URL::~URL() noexcept(false) {
KJ_IF_SOME(searchParams, maybeSearchParams) {
searchParams->maybeUrl = nullptr;
searchParams->maybeUrl = kj::none;
}
}

Expand Down

0 comments on commit a3a0f95

Please sign in to comment.