File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -19,20 +19,22 @@ use spin_factor_variables::runtime_config::RuntimeConfig;
1919/// Resolves a runtime configuration for the variables factor from a TOML table.
2020pub fn runtime_config_from_toml ( table : & impl GetTomlValue ) -> anyhow:: Result < RuntimeConfig > {
2121 // Always include the environment variable provider.
22- let mut providers = vec ! [ Box :: <EnvVariablesProvider >:: default ( ) as _] ;
22+ let var_provider = vec ! [ Box :: <EnvVariablesProvider >:: default ( ) as _] ;
2323 let value = table
2424 . get ( "variables_provider" )
2525 . or_else ( || table. get ( "config_provider" ) ) ;
2626 let Some ( array) = value else {
27- return Ok ( RuntimeConfig { providers } ) ;
27+ return Ok ( RuntimeConfig {
28+ providers : var_provider,
29+ } ) ;
2830 } ;
2931
3032 let provider_configs: Vec < VariableProviderConfiguration > = array. clone ( ) . try_into ( ) ?;
31- let new_providers = provider_configs
33+ let mut providers = provider_configs
3234 . into_iter ( )
3335 . map ( VariableProviderConfiguration :: into_provider)
3436 . collect :: < anyhow:: Result < Vec < _ > > > ( ) ?;
35- providers. extend ( new_providers ) ;
37+ providers. extend ( var_provider ) ;
3638 Ok ( RuntimeConfig { providers } )
3739}
3840
You can’t perform that action at this time.
0 commit comments