chore: Remove template Callbacks (#4431)

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
This commit is contained in:
Stepan Bagritsevich 2025-01-13 14:33:17 +01:00 committed by GitHub
parent 29cde99ca5
commit f6441df57a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -81,8 +81,8 @@ FieldValue ExtractSortableValueFromJson(const search::Schema& schema, string_vie
}
/* Returns true if json elements were successfully processed. */
template <typename Callback>
bool ProcessJsonElements(const std::vector<JsonType>& json_elements, Callback&& cb) {
bool ProcessJsonElements(const std::vector<JsonType>& json_elements,
absl::FunctionRef<bool(const JsonType&)> cb) {
auto process = [&cb](const auto& json_range) -> bool {
for (const auto& json : json_range) {
if (!json.is_null() && !cb(json)) {