mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
Unfortunately `StringSource` class is very easy was very easy to misuse
because the ctor took a plain `std::string_view` which has a bad habit
of being implicitly convertible from an rvalue `std::string`. This lead
to unintentional use-after-free bugs.
This patch makes `StringSource` much harder to misuse by disabling the ctor
from a `std::string &&` (but `const std::string &` is ok).
Fix affected tests from libstore-tests.
Reformat those tests with clangd's range formatting since the diff is tiny
and it seems appropriate.
(cherry picked from commit
|
||
---|---|---|
.. | ||
libexpr | ||
libexpr-support | ||
libfetchers | ||
libflake | ||
libstore | ||
libstore-support | ||
libutil | ||
libutil-support |