Skip to content

Commit

Permalink
remove unnecessary checks
Browse files Browse the repository at this point in the history
Signed-off-by: wangbaiping <wangbaiping@bytedance.com>
  • Loading branch information
wbpcode committed Oct 1, 2024
1 parent 2eed20e commit 6799d16
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions source/common/formatter/stream_info_formatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,6 @@ FilterStateFormatter::format(const StreamInfo::StreamInfo& stream_info) const {
#endif
}
case FilterStateFormat::Field: {
if (!state->hasFieldSupport()) {
return absl::nullopt;
}
auto field_value = state->getField(field_name_);
auto string_value = absl::visit(StringFieldVisitor(), field_value);
if (!string_value) {
Expand Down Expand Up @@ -310,9 +307,6 @@ FilterStateFormatter::formatValue(const StreamInfo::StreamInfo& stream_info) con
return SubstitutionFormatUtils::unspecifiedValue();
}
case FilterStateFormat::Field: {
if (!state->hasFieldSupport()) {
return SubstitutionFormatUtils::unspecifiedValue();
}
auto field_value = state->getField(field_name_);
auto string_value = absl::visit(StringFieldVisitor(), field_value);
if (!string_value) {
Expand Down

0 comments on commit 6799d16

Please sign in to comment.