@@ -4,8 +4,9 @@ use crate::{
44 instr_metadata:: base_metadata:: BaseMetadata ,
55 model:: {
66 chan_data:: channel_range:: ChannelRange ,
7- sweep_data:: { parameters:: ParameterFloat , sweep_config:: SweepConfig ,
8- parameters:: ParameterString } ,
7+ sweep_data:: {
8+ parameters:: ParameterFloat , parameters:: ParameterString , sweep_config:: SweepConfig ,
9+ } ,
910 } ,
1011} ;
1112
@@ -106,24 +107,22 @@ impl SweepModel {
106107 bias_channel. common_chan_attributes . device . get_model ( ) ,
107108 ) ;
108109
109- let val = self . get_function_value ( & bias_channel. common_chan_attributes . source_function )
110+ let val = self
111+ . get_function_value ( & bias_channel. common_chan_attributes . source_function )
110112 . clone ( ) ;
111- self . val_replacement_map . insert (
112- instr_name. clone ( ) + ":SFUNCTION" ,
113- val,
114- ) ;
113+ self . val_replacement_map
114+ . insert ( instr_name. clone ( ) + ":SFUNCTION" , val) ;
115115
116116 self . val_replacement_map . insert (
117117 instr_name. clone ( ) + ":SRANGE" ,
118118 self . format_range ( bias_channel. common_chan_attributes . source_range . clone ( ) ) ,
119119 ) ;
120120
121- let val = self . get_function_value ( & bias_channel. common_chan_attributes . meas_function )
121+ let val = self
122+ . get_function_value ( & bias_channel. common_chan_attributes . meas_function )
122123 . clone ( ) ;
123- self . val_replacement_map . insert (
124- instr_name. clone ( ) + ":MFUNCTION" ,
125- val,
126- ) ;
124+ self . val_replacement_map
125+ . insert ( instr_name. clone ( ) + ":MFUNCTION" , val) ;
127126
128127 //sense mode exists only for SMU
129128 if let Some ( sense_mode) = & bias_channel. common_chan_attributes . sense_mode {
@@ -133,10 +132,8 @@ impl SweepModel {
133132 . get_name_for ( & sense_mode_key)
134133 {
135134 let val = self . get_sense_mode_value ( & sense_mode_value) ;
136- self . val_replacement_map . insert (
137- instr_name. clone ( ) + ":SENSE" ,
138- val,
139- ) ;
135+ self . val_replacement_map
136+ . insert ( instr_name. clone ( ) + ":SENSE" , val) ;
140137 } else {
141138 //TODO: error handling for sense mode value not found
142139 }
@@ -239,17 +236,16 @@ impl SweepModel {
239236 . get_model ( ) ,
240237 ) ;
241238
242- let val = self . get_function_value (
239+ let val = self
240+ . get_function_value (
243241 & step_channel
244242 . start_stop_channel
245243 . common_chan_attributes
246244 . source_function ,
247245 )
248246 . clone ( ) ;
249- self . val_replacement_map . insert (
250- instr_name. clone ( ) + ":SFUNCTION" ,
251- val,
252- ) ;
247+ self . val_replacement_map
248+ . insert ( instr_name. clone ( ) + ":SFUNCTION" , val) ;
253249
254250 self . val_replacement_map . insert (
255251 instr_name. clone ( ) + ":SRANGE" ,
@@ -262,17 +258,16 @@ impl SweepModel {
262258 ) ,
263259 ) ;
264260
265- let val = self . get_function_value (
261+ let val = self
262+ . get_function_value (
266263 & step_channel
267264 . start_stop_channel
268265 . common_chan_attributes
269- . meas_function
266+ . meas_function ,
270267 )
271268 . clone ( ) ;
272- self . val_replacement_map . insert (
273- instr_name. clone ( ) + ":MFUNCTION" ,
274- val,
275- ) ;
269+ self . val_replacement_map
270+ . insert ( instr_name. clone ( ) + ":MFUNCTION" , val) ;
276271
277272 self . val_replacement_map . insert (
278273 instr_name. clone ( ) + ":MODE" ,
@@ -296,10 +291,8 @@ impl SweepModel {
296291 . get_name_for ( & sense_mode_key)
297292 {
298293 let val = self . get_sense_mode_value ( & sense_mode_value) ;
299- self . val_replacement_map . insert (
300- instr_name. clone ( ) + ":SENSE" ,
301- val,
302- ) ;
294+ self . val_replacement_map
295+ . insert ( instr_name. clone ( ) + ":SENSE" , val) ;
303296 }
304297 }
305298
@@ -444,17 +437,16 @@ impl SweepModel {
444437 . get_model ( ) ,
445438 ) ;
446439
447- let val = self . get_function_value (
440+ let val = self
441+ . get_function_value (
448442 & sweep_channel
449443 . start_stop_channel
450444 . common_chan_attributes
451- . source_function
445+ . source_function ,
452446 )
453447 . clone ( ) ;
454- self . val_replacement_map . insert (
455- instr_name. clone ( ) + ":SFUNCTION" ,
456- val,
457- ) ;
448+ self . val_replacement_map
449+ . insert ( instr_name. clone ( ) + ":SFUNCTION" , val) ;
458450 self . val_replacement_map . insert (
459451 instr_name. clone ( ) + ":SRANGE" ,
460452 self . format_range (
@@ -466,17 +458,16 @@ impl SweepModel {
466458 ) ,
467459 ) ;
468460
469- let val = self . get_function_value (
461+ let val = self
462+ . get_function_value (
470463 & sweep_channel
471464 . start_stop_channel
472465 . common_chan_attributes
473- . meas_function
466+ . meas_function ,
474467 )
475468 . clone ( ) ;
476- self . val_replacement_map . insert (
477- instr_name. clone ( ) + ":MFUNCTION" ,
478- val,
479- ) ;
469+ self . val_replacement_map
470+ . insert ( instr_name. clone ( ) + ":MFUNCTION" , val) ;
480471
481472 self . val_replacement_map . insert (
482473 instr_name. clone ( ) + ":MODE" ,
@@ -499,10 +490,8 @@ impl SweepModel {
499490 . get_name_for ( & sense_mode_key)
500491 {
501492 let val = self . get_sense_mode_value ( & sense_mode_value) ;
502- self . val_replacement_map . insert (
503- instr_name. clone ( ) + ":SENSE" ,
504- val,
505- ) ;
493+ self . val_replacement_map
494+ . insert ( instr_name. clone ( ) + ":SENSE" , val) ;
506495 } else {
507496 //TODO: error handling for sense mode value not found
508497 }
0 commit comments