From 2d673e164b98db5eb08d4c41c6225fbe73ee82d7 Mon Sep 17 00:00:00 2001 From: 0xf00sec <159052166+0xf00sec@users.noreply.github.com> Date: Sun, 28 Sep 2025 15:10:46 +0300 Subject: ErrorOr.h: T.Value Introduced T& Value() to extract the underlying scalar value without implying ownership transfer. Kept Leak() to explicitly indicate heap ownership transfer. Signed-off-by: 0xf00sec <159052166+0xf00sec@users.noreply.github.com> --- dev/kernel/NeKit/ErrorOr.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dev/kernel/NeKit/ErrorOr.h') diff --git a/dev/kernel/NeKit/ErrorOr.h b/dev/kernel/NeKit/ErrorOr.h index b653e0ee..52f0d6a9 100644 --- a/dev/kernel/NeKit/ErrorOr.h +++ b/dev/kernel/NeKit/ErrorOr.h @@ -38,6 +38,8 @@ class ErrorOr final { return *this; } + T Value() const { return *mRef; } + Ref& Leak() { return mRef; } Int32 Error() { return mId; } -- cgit v1.2.3