refactor(3p/nix/libutil): Replace chomp() with absl::strings
This commit is contained in:
parent
10481d2586
commit
06d7b4aebd
15 changed files with 40 additions and 26 deletions
3
third_party/nix/src/nix-build/nix-build.cc
vendored
3
third_party/nix/src/nix-build/nix-build.cc
vendored
|
|
@ -5,6 +5,7 @@
|
|||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
#include <absl/strings/ascii.h>
|
||||
#include <glog/logging.h>
|
||||
|
||||
#include "affinity.hh"
|
||||
|
|
@ -121,7 +122,7 @@ static void _main(int argc, char** argv) {
|
|||
}
|
||||
args.clear();
|
||||
for (auto line : lines) {
|
||||
line = chomp(line);
|
||||
line = absl::StripTrailingAsciiWhitespace(line);
|
||||
std::smatch match;
|
||||
if (std::regex_match(line, match,
|
||||
std::regex("^#!\\s*nix-shell (.*)$"))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue