1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:37:34 +00:00

LibWeb: Mark WebIDL::ExceptionOr<T> as [[nodiscard]]

This commit is contained in:
Linus Groh 2022-10-30 17:50:52 +00:00
parent acfb546048
commit a80da456a5

View file

@ -33,7 +33,7 @@ struct SimpleException {
}; };
template<typename ValueType> template<typename ValueType>
class ExceptionOr { class [[nodiscard]] ExceptionOr {
public: public:
ExceptionOr() requires(IsSame<ValueType, Empty>) ExceptionOr() requires(IsSame<ValueType, Empty>)
: m_result(Empty {}) : m_result(Empty {})
@ -119,7 +119,7 @@ private:
}; };
template<> template<>
class ExceptionOr<void> : public ExceptionOr<Empty> { class [[nodiscard]] ExceptionOr<void> : public ExceptionOr<Empty> {
public: public:
using ExceptionOr<Empty>::ExceptionOr; using ExceptionOr<Empty>::ExceptionOr;
}; };