Skip to content

Commit

Permalink
Fix some spelling.
Browse files Browse the repository at this point in the history
Signed-off-by: John Plevyak <[email protected]>
  • Loading branch information
jplevyak committed Apr 16, 2020
1 parent ee1881b commit faebd70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions source/extensions/common/wasm/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Http::RequestTrailerMapPtr buildRequestTrailerMapFromPairs(const Pairs& pairs) {
// Note: because of the lack of a string_view interface for addCopy and
// the lack of an interface to add an entry with an empty value and return
// the entry, there is no efficient way to prevent either a double copy
// of the valueor a double lookup of the entry.
// of the value or a double lookup of the entry.
map->addCopy(Http::LowerCaseString(std::string(p.first)), std::string(p.second));
}
return map;
Expand All @@ -214,7 +214,7 @@ Http::RequestHeaderMapPtr buildRequestHeaderMapFromPairs(const Pairs& pairs) {
// Note: because of the lack of a string_view interface for addCopy and
// the lack of an interface to add an entry with an empty value and return
// the entry, there is no efficient way to prevent either a double copy
// of the valueor a double lookup of the entry.
// of the value or a double lookup of the entry.
map->addCopy(Http::LowerCaseString(std::string(p.first)), std::string(p.second));
}
return map;
Expand Down Expand Up @@ -360,13 +360,13 @@ WasmResult serializeValue(Filters::Common::Expr::CelValue value, std::string* re
return WasmResult::Ok;
}
case CelValue::Type::kDuration: {
// Warning: loss of precision to nano-seconds
// Warning: loss of precision to nanoseconds
int64_t out = absl::ToInt64Nanoseconds(value.DurationOrDie());
result->assign(reinterpret_cast<const char*>(&out), sizeof(int64_t));
return WasmResult::Ok;
}
case CelValue::Type::kTimestamp: {
// Warning: loss of precision to nano-seconds
// Warning: loss of precision to nanoseconds
int64_t out = absl::ToUnixNanos(value.TimestampOrDie());
result->assign(reinterpret_cast<const char*>(&out), sizeof(int64_t));
return WasmResult::Ok;
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/wasm/test_data/stats_cpp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extern "C" PROXY_WASM_KEEPALIVE uint32_t proxy_on_vm_start(uint32_t, uint32_t) {
logInfo(std::string("get counter = ") + std::to_string(value));
CHECK_RESULT(getMetric(g, &value));
logWarn(std::string("get gauge = ") + std::to_string(value));
// Get on histograms is not suppoorted.
// Get on histograms is not supported.
if (getMetric(h, &value) != WasmResult::Ok) {
logError(std::string("get histogram = Unsupported"));
}
Expand Down

0 comments on commit faebd70

Please sign in to comment.