| 54 | } |
| 55 | |
| 56 | void Store(const TStringBuf key, const TStringBuf data) override { |
| 57 | auto kk = ToK(key); |
| 58 | |
| 59 | const auto [it, unique] = try_emplace(kk, nullptr); |
| 60 | if (!unique) { |
| 61 | const auto& [_, value] = *it->second; |
| 62 | if (value != data) { |
| 63 | ReportRedefinitionError(key, data, kk, *it->second); |
| 64 | Y_UNREACHABLE(); |
| 65 | } |
| 66 | } else { |
| 67 | D_.push_back(TDescriptor(key, data)); |
| 68 | it->second = &D_.back(); |
| 69 | } |
| 70 | |
| 71 | Y_ABORT_UNLESS(size() == Count(), "size mismatch"); |
| 72 | } |
| 73 | |
| 74 | bool Has(const TStringBuf key) const override { |
| 75 | return contains(ToK(key)); |
no test coverage detected