mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-27 00:06:16 +02: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…
Reference in a new issue