blob: 86a2632fb64e46f9bb00f712a3e8e17700b1447f [file] [log] [blame]
#include "editions/edition_defaults_test_utils.h"
#include "google/protobuf/descriptor.pb.h"
#include "absl/types/optional.h"
namespace google {
namespace protobuf {
namespace compiler {
absl::optional<FeatureSetDefaults::FeatureSetEditionDefault> FindEditionDefault(
const FeatureSetDefaults& defaults, Edition edition) {
for (const auto& edition_default : defaults.defaults()) {
if (edition_default.edition() == edition) {
return edition_default;
}
}
return absl::nullopt;
}
} // namespace compiler
} // namespace protobuf
} // namespace google