@@ -123,14 +123,14 @@ fn print_toml(config: &Config, opts: &GetOptions<'_>, key: &ConfigKey, cv: &CV)
123123 format ! ( " # {}" , def)
124124 } ;
125125 match cv {
126- CV :: Boolean ( val, def) => drop_println ! ( config, "{} = {}{}" , key, val, origin( & def) ) ,
127- CV :: Integer ( val, def) => drop_println ! ( config, "{} = {}{}" , key, val, origin( & def) ) ,
126+ CV :: Boolean ( val, def) => drop_println ! ( config, "{} = {}{}" , key, val, origin( def) ) ,
127+ CV :: Integer ( val, def) => drop_println ! ( config, "{} = {}{}" , key, val, origin( def) ) ,
128128 CV :: String ( val, def) => drop_println ! (
129129 config,
130130 "{} = {}{}" ,
131131 key,
132132 toml:: to_string( & val) . unwrap( ) ,
133- origin( & def)
133+ origin( def)
134134 ) ,
135135 CV :: List ( vals, _def) => {
136136 if opts. show_origin {
@@ -145,13 +145,13 @@ fn print_toml(config: &Config, opts: &GetOptions<'_>, key: &ConfigKey, cv: &CV)
145145 }
146146 }
147147 CV :: Table ( table, _def) => {
148- let mut key_vals: Vec < _ > = table. into_iter ( ) . collect ( ) ;
149- key_vals. sort_by ( |a, b| a. 0 . cmp ( & b. 0 ) ) ;
148+ let mut key_vals: Vec < _ > = table. iter ( ) . collect ( ) ;
149+ key_vals. sort_by ( |a, b| a. 0 . cmp ( b. 0 ) ) ;
150150 for ( table_key, val) in key_vals {
151151 let mut subkey = key. clone ( ) ;
152152 // push or push_sensitive shouldn't matter here, since this is
153153 // not dealing with environment variables.
154- subkey. push ( & table_key) ;
154+ subkey. push ( table_key) ;
155155 print_toml ( config, opts, & subkey, val) ;
156156 }
157157 }
@@ -205,7 +205,7 @@ fn print_json(config: &Config, key: &ConfigKey, cv: &CV, include_key: bool) {
205205 CV :: Integer ( val, _def) => json ! ( val) ,
206206 CV :: String ( val, _def) => json ! ( val) ,
207207 CV :: List ( vals, _def) => {
208- let jvals: Vec < _ > = vals. into_iter ( ) . map ( |( val, _def) | json ! ( val) ) . collect ( ) ;
208+ let jvals: Vec < _ > = vals. iter ( ) . map ( |( val, _def) | json ! ( val) ) . collect ( ) ;
209209 json ! ( jvals)
210210 }
211211 CV :: Table ( map, _def) => {
0 commit comments