Prechádzať zdrojové kódy

LibJS: Allow comparing module records by equality

Shannon Booth 7 mesiacov pred
rodič
commit
1a15e2cec6
1 zmenil súbory, kde vykonal 4 pridanie a 0 odobranie
  1. 4 0
      Libraries/LibJS/Runtime/ModuleRequest.h

+ 4 - 0
Libraries/LibJS/Runtime/ModuleRequest.h

@@ -22,6 +22,8 @@ struct ModuleWithSpecifier {
 struct ImportAttribute {
     ByteString key;
     ByteString value;
+
+    bool operator==(ImportAttribute const&) const = default;
 };
 
 // https://tc39.es/proposal-import-attributes/#modulerequest-record
@@ -42,6 +44,8 @@ struct ModuleRequest {
 
     DeprecatedFlyString module_specifier; // [[Specifier]]
     Vector<ImportAttribute> attributes;   // [[Attributes]]
+
+    bool operator==(ModuleRequest const&) const = default;
 };
 
 }