File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33// This product includes software developed at Datadog (https://www.datadoghq.com/).
44// Copyright 2026-present Datadog, Inc.
55
6-
7-
86mod env_bindings;
97mod system_probe;
108mod yaml_load;
@@ -531,9 +529,7 @@ pub fn condition_config_summary(conditions: &[ConditionConfigFile]) -> String {
531529 . iter ( )
532530 . flat_map ( |file| {
533531 let path = expand_env_vars ( & file. path ) ;
534- file. keys
535- . iter ( )
536- . map ( move |key| format ! ( "{path}:{key}" ) )
532+ file. keys . iter ( ) . map ( move |key| format ! ( "{path}:{key}" ) )
537533 } )
538534 . collect :: < Vec < _ > > ( )
539535 . join ( ", " )
@@ -1690,10 +1686,7 @@ process_config:
16901686 value_as_bool( & serde_yaml:: Value :: String ( "yes" . into( ) ) ) ,
16911687 Some ( false )
16921688 ) ;
1693- assert_eq ! (
1694- value_as_bool( & serde_yaml:: Value :: Bool ( true ) ) ,
1695- Some ( true )
1696- ) ;
1689+ assert_eq ! ( value_as_bool( & serde_yaml:: Value :: Bool ( true ) ) , Some ( true ) ) ;
16971690 }
16981691
16991692 #[ test]
@@ -1987,9 +1980,9 @@ process_config:
19871980 let dir = tempfile:: tempdir ( ) . unwrap ( ) ;
19881981 let agent = write_config ( dir. path ( ) , "datadog.yaml" , ALL_PROCESS_GATES_OFF ) ;
19891982 let sysprobe = write_config ( dir. path ( ) , "system-probe.yaml" , "# empty\n " ) ;
1990- assert ! ( condition_config_any_met(
1991- & process_agent_windows_conditions ( agent, sysprobe)
1992- ) ) ;
1983+ assert ! ( condition_config_any_met( & process_agent_windows_conditions (
1984+ agent, sysprobe
1985+ ) ) ) ;
19931986 } ) ;
19941987 }
19951988
Original file line number Diff line number Diff line change @@ -79,10 +79,7 @@ mod tests {
7979 fn permissive_parse_accepts_null_with_duplicate_keys ( ) {
8080 let yaml = "network_config:\n enabled:\n system_probe_config:\n enabled: true\n process_config:\n enabled: false\n process_config:\n process_collection:\n enabled: true\n " ;
8181 let root = load_yaml ( yaml) . unwrap ( ) ;
82- assert_eq ! (
83- dotted( & root, "network_config.enabled" ) ,
84- Some ( & Value :: Null )
85- ) ;
82+ assert_eq ! ( dotted( & root, "network_config.enabled" ) , Some ( & Value :: Null ) ) ;
8683 assert_eq ! (
8784 dotted( & root, "system_probe_config.enabled" ) ,
8885 Some ( & Value :: Bool ( true ) )
Original file line number Diff line number Diff line change @@ -124,7 +124,10 @@ impl Builder {
124124 pending_key : None ,
125125 anchor,
126126 } => ( pairs, anchor) ,
127- Frame :: Mapping { pending_key : Some ( _) , .. } => {
127+ Frame :: Mapping {
128+ pending_key : Some ( _) ,
129+ ..
130+ } => {
128131 bail ! ( "YAML mapping ended before value for key" ) ;
129132 }
130133 _ => bail ! ( "YAML mapping end without matching start" ) ,
@@ -157,7 +160,9 @@ impl Builder {
157160 fn attach ( & mut self , value : Value ) {
158161 match self . stack . last_mut ( ) {
159162 None => self . root = Some ( value) ,
160- Some ( Frame :: Mapping { pairs, pending_key, .. } ) => {
163+ Some ( Frame :: Mapping {
164+ pairs, pending_key, ..
165+ } ) => {
161166 if pending_key. is_none ( ) {
162167 * pending_key = Some ( scalar_as_key ( value) ) ;
163168 } else {
You can’t perform that action at this time.
0 commit comments