deinline KJ_STRINGIFY StructEqualityResult

parent 341eac28
...@@ -122,6 +122,17 @@ StructEqualityResult equal(AnyStruct::Reader left, AnyStruct::Reader right) { ...@@ -122,6 +122,17 @@ StructEqualityResult equal(AnyStruct::Reader left, AnyStruct::Reader right) {
} }
kj::StringPtr KJ_STRINGIFY(StructEqualityResult res) {
switch(res) {
case StructEqualityResult::NOT_EQUAL:
return "NOT_EQUAL";
case StructEqualityResult::EQUAL:
return "EQUAL";
case StructEqualityResult::UNKNOWN_CONTAINS_CAPS:
return "UNKNOWN_CONTAINS_CAPS";
}
}
StructEqualityResult equal(AnyList::Reader left, AnyList::Reader right) { StructEqualityResult equal(AnyList::Reader left, AnyList::Reader right) {
if(left.size() != right.size()) { if(left.size() != right.size()) {
return StructEqualityResult::NOT_EQUAL; return StructEqualityResult::NOT_EQUAL;
......
...@@ -812,16 +812,7 @@ enum class StructEqualityResult { ...@@ -812,16 +812,7 @@ enum class StructEqualityResult {
UNKNOWN_CONTAINS_CAPS UNKNOWN_CONTAINS_CAPS
}; };
inline kj::StringPtr KJ_STRINGIFY(StructEqualityResult res) { kj::StringPtr KJ_STRINGIFY(StructEqualityResult res);
switch(res) {
case StructEqualityResult::NOT_EQUAL:
return "NOT_EQUAL";
case StructEqualityResult::EQUAL:
return "EQUAL";
case StructEqualityResult::UNKNOWN_CONTAINS_CAPS:
return "UNKNOWN_CONTAINS_CAPS";
}
}
StructEqualityResult equal(AnyStruct::Reader left, AnyStruct::Reader right); StructEqualityResult equal(AnyStruct::Reader left, AnyStruct::Reader right);
StructEqualityResult equal(List<AnyStruct>::Reader left, List<AnyStruct>::Reader right); StructEqualityResult equal(List<AnyStruct>::Reader left, List<AnyStruct>::Reader right);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment