1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

compare string values with strcmp

string_view()ification calls strlen() first, which we don't need here.
This commit is contained in:
pennae 2023-12-10 09:25:20 +01:00
parent 78353deb02
commit 74c134914c
2 changed files with 3 additions and 3 deletions

View file

@ -2436,7 +2436,7 @@ bool EvalState::eqValues(Value & v1, Value & v2, const PosIdx pos, std::string_v
return v1.boolean == v2.boolean;
case nString:
return v1.string_view().compare(v2.string_view()) == 0;
return strcmp(v1.c_str(), v2.c_str()) == 0;
case nPath:
return