From bb4c7b6a35ee99fe69b2d977a7f64dbfac2ee559 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 14 Jan 2023 10:56:20 -0500 Subject: [PATCH] LibJS: Remove now-unused ThrowableFormat header The one place this was used now uses the fallible String::formatted. --- .../Libraries/LibJS/Runtime/ThrowableFormat.h | 28 ------------------- 1 file changed, 28 deletions(-) delete mode 100644 Userland/Libraries/LibJS/Runtime/ThrowableFormat.h diff --git a/Userland/Libraries/LibJS/Runtime/ThrowableFormat.h b/Userland/Libraries/LibJS/Runtime/ThrowableFormat.h deleted file mode 100644 index 2505d105bd..0000000000 --- a/Userland/Libraries/LibJS/Runtime/ThrowableFormat.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2023, Tim Flynn - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#pragma once - -#include -#include -#include -#include -#include -#include - -namespace JS { - -template -ThrowCompletionOr deprecated_format(VM& vm, CheckedFormatString&& fmtstr, Args const&... args) -{ - StringBuilder builder; - AK::VariadicFormatParams parameters { args... }; - - TRY_OR_THROW_OOM(vm, vformat(builder, fmtstr.view(), parameters)); - return builder.to_deprecated_string(); -} - -}