From 6b9cfad7b4e15d0b6ae649a337794999a7e6fc7c Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 16 May 2024 18:07:31 -0700 Subject: [PATCH] Update some kj::Maybe assignments from nullptr to kj::none --- src/workerd/api/sql.c++ | 2 +- src/workerd/api/streams/queue.c++ | 4 ++-- src/workerd/api/url-standard.c++ | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/workerd/api/sql.c++ b/src/workerd/api/sql.c++ index e712e18aae5..44f6824f56c 100644 --- a/src/workerd/api/sql.c++ +++ b/src/workerd/api/sql.c++ @@ -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; } } } diff --git a/src/workerd/api/streams/queue.c++ b/src/workerd/api/streams/queue.c++ index fb0cd9bf139..a369880d824 100644 --- a/src/workerd/api/streams/queue.c++ +++ b/src/workerd/api/streams/queue.c++ @@ -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; } } diff --git a/src/workerd/api/url-standard.c++ b/src/workerd/api/url-standard.c++ index 2e79cb1816c..700119ebd67 100644 --- a/src/workerd/api/url-standard.c++ +++ b/src/workerd/api/url-standard.c++ @@ -42,7 +42,7 @@ URL::URL(kj::StringPtr url, kj::Maybe base) : inner(parseImpl(url URL::~URL() noexcept(false) { KJ_IF_SOME(searchParams, maybeSearchParams) { - searchParams->maybeUrl = nullptr; + searchParams->maybeUrl = kj::none; } }