mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 23:12:44 +01:00
Avoid a string copy during Hash::to_string
This commit is contained in:
parent
56dc6ed841
commit
957f832074
1 changed files with 1 additions and 1 deletions
|
|
@ -130,7 +130,7 @@ std::string Hash::to_string(Base base, bool includeType) const
|
||||||
break;
|
break;
|
||||||
case Base64:
|
case Base64:
|
||||||
case SRI:
|
case SRI:
|
||||||
s += base64Encode(std::string((const char *) hash, hashSize));
|
s += base64Encode(std::string_view((const char *) hash, hashSize));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue