mirror of
https://github.com/NixOS/nix.git
synced 2025-11-30 14:10:59 +01:00
Merge remote-tracking branch 'origin/master' into lazy-trees
This commit is contained in:
commit
dbe7fcebff
25 changed files with 188 additions and 120 deletions
|
|
@ -8,9 +8,9 @@ std::string hiliteMatches(
|
|||
std::string_view prefix,
|
||||
std::string_view postfix)
|
||||
{
|
||||
// Avoid copy on zero matches
|
||||
// Avoid extra work on zero matches
|
||||
if (matches.size() == 0)
|
||||
return (std::string) s;
|
||||
return std::string(s);
|
||||
|
||||
std::sort(matches.begin(), matches.end(), [](const auto & a, const auto & b) {
|
||||
return a.position() < b.position();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue