Commit 389fb8a5 authored by Tom Jackson's avatar Tom Jackson Committed by Jordan DeLong

Removing unneeded eachAs() operators

Summary: ##byLine## already yields StringPieces, no neat to ##eachAs()## then.

Test Plan:
fbconfig folly/experimental/symbolizer folly/test folly/experimental/io folly/experimental/io/test tupperware/agent
fbmake opt

Reviewed By: tudorb@fb.com

FB internal diff: D630422
parent b24f3cf8
......@@ -54,7 +54,7 @@ size_t getDefaultHugePageSize() {
size_t pageSize = 0;
boost::cmatch match;
bool error = gen::byLine("/proc/meminfo") | gen::eachAs<StringPiece>() |
bool error = gen::byLine("/proc/meminfo") |
[&] (StringPiece line) -> bool {
if (boost::regex_match(line.begin(), line.end(), match, regex)) {
StringPiece numStr(line.begin() + match.position(1), match.length(1));
......
......@@ -77,7 +77,7 @@ bool Symbolizer::symbolize(uintptr_t address, StringPiece& symbolName,
boost::cmatch match;
MappedFile foundFile;
bool error = gen::byLine("/proc/self/maps") | gen::eachAs<StringPiece>() |
bool error = gen::byLine("/proc/self/maps") |
[&] (StringPiece line) -> bool {
CHECK(boost::regex_match(line.begin(), line.end(), match, mapLineRegex));
uint64_t begin = fromHex(sp(match[1]));
......
......@@ -59,7 +59,7 @@ TEST(SimpleSubprocessTest, ShellExitsWithError) {
TEST(PopenSubprocessTest, PopenRead) {
Subprocess proc("ls /", Subprocess::pipeStdout());
int found = 0;
gen::byLine(proc.stdout()) | gen::eachAs<StringPiece>() |
gen::byLine(proc.stdout()) |
[&] (StringPiece line) {
if (line == "etc" || line == "bin" || line == "usr") {
++found;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment