@@ -258,7 +258,7 @@ fn build_cache_entry(event: &Event, fields: &FieldMatchConfig) -> CacheEntry {
258258
259259 if let Some ( all_fields) = event. as_log ( ) . all_fields ( ) {
260260 for ( field_name, value) in all_fields {
261- if let Some ( path) = ConfigTargetPath :: try_from ( field_name) . ok ( ) {
261+ if let Ok ( path) = ConfigTargetPath :: try_from ( field_name) {
262262 if !fields. contains ( & path) {
263263 entry. push ( ( path, type_id_for_value ( value) , value. coerce_to_bytes ( ) ) ) ;
264264 }
@@ -288,6 +288,7 @@ impl TaskTransform<Event> for Dedupe {
288288mod tests {
289289 use std:: { collections:: BTreeMap , sync:: Arc } ;
290290
291+ use lookup:: lookup_v2:: ConfigTargetPath ;
291292 use tokio:: sync:: mpsc;
292293 use tokio_stream:: wrappers:: ReceiverStream ;
293294 use vector_common:: config:: ComponentKey ;
@@ -308,7 +309,10 @@ mod tests {
308309 crate :: test_util:: test_generate_config :: < DedupeConfig > ( ) ;
309310 }
310311
311- fn make_match_transform_config ( num_events : usize , fields : Vec < String > ) -> DedupeConfig {
312+ fn make_match_transform_config (
313+ num_events : usize ,
314+ fields : Vec < ConfigTargetPath > ,
315+ ) -> DedupeConfig {
312316 DedupeConfig {
313317 cache : CacheConfig {
314318 num_events : std:: num:: NonZeroUsize :: new ( num_events) . expect ( "non-zero num_events" ) ,
@@ -317,7 +321,10 @@ mod tests {
317321 }
318322 }
319323
320- fn make_ignore_transform_config ( num_events : usize , given_fields : Vec < String > ) -> DedupeConfig {
324+ fn make_ignore_transform_config (
325+ num_events : usize ,
326+ given_fields : Vec < ConfigTargetPath > ,
327+ ) -> DedupeConfig {
321328 // "message" and "timestamp" are added automatically to all Events
322329 let mut fields = vec ! [ "message" . into( ) , "timestamp" . into( ) ] ;
323330 fields. extend ( given_fields) ;
0 commit comments