Skip to content

Commit 357c720

Browse files
committed
Remove call sites
1 parent c0614cb commit 357c720

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

dsc/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ fn main() {
136136
parameters
137137
};
138138

139-
subcommand::config(&subcommand, &merged_parameters, false, system_root.as_ref(), &as_group, &as_assert, &as_include, progress_format);
139+
subcommand::config(&subcommand, &merged_parameters, system_root.as_ref(), &as_group, &as_assert, &as_include, progress_format);
140140
},
141141
SubCommand::Extension { subcommand } => {
142142
subcommand::extension(&subcommand, progress_format);

dsc/src/subcommand.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,15 @@ fn initialize_config_root(path: Option<&String>) -> Option<String> {
276276

277277
#[allow(clippy::too_many_lines)]
278278
#[allow(clippy::too_many_arguments)]
279-
pub fn config(subcommand: &ConfigSubCommand, parameters: &Option<String>, parameters_from_stdin: bool, mounted_path: Option<&String>, as_group: &bool, as_assert: &bool, as_include: &bool, progress_format: ProgressFormat) {
279+
pub fn config(subcommand: &ConfigSubCommand, parameters: &Option<String>, mounted_path: Option<&String>, as_group: &bool, as_assert: &bool, as_include: &bool, progress_format: ProgressFormat) {
280280
let (new_parameters, json_string) = match subcommand {
281281
ConfigSubCommand::Get { input, file, .. } |
282282
ConfigSubCommand::Set { input, file, .. } |
283283
ConfigSubCommand::Test { input, file, .. } |
284284
ConfigSubCommand::Validate { input, file, .. } |
285285
ConfigSubCommand::Export { input, file, .. } => {
286286
let new_path = initialize_config_root(file.as_ref());
287-
let document = get_input(input.as_ref(), new_path.as_ref(), parameters_from_stdin);
287+
let document = get_input(input.as_ref(), new_path.as_ref());
288288
if *as_include {
289289
let (new_parameters, config_json) = match get_contents(&document) {
290290
Ok((parameters, config_json)) => (parameters, config_json),
@@ -300,7 +300,7 @@ pub fn config(subcommand: &ConfigSubCommand, parameters: &Option<String>, parame
300300
},
301301
ConfigSubCommand::Resolve { input, file, .. } => {
302302
let new_path = initialize_config_root(file.as_ref());
303-
let document = get_input(input.as_ref(), new_path.as_ref(), parameters_from_stdin);
303+
let document = get_input(input.as_ref(), new_path.as_ref());
304304
let (new_parameters, config_json) = match get_contents(&document) {
305305
Ok((parameters, config_json)) => (parameters, config_json),
306306
Err(err) => {
@@ -398,7 +398,7 @@ pub fn config(subcommand: &ConfigSubCommand, parameters: &Option<String>, parame
398398
};
399399
if *as_include {
400400
let new_path = initialize_config_root(file.as_ref());
401-
let input = get_input(input.as_ref(), new_path.as_ref(), parameters_from_stdin);
401+
let input = get_input(input.as_ref(), new_path.as_ref());
402402
match serde_json::from_str::<Include>(&input) {
403403
Ok(_) => {
404404
// valid, so do nothing
@@ -554,7 +554,7 @@ pub fn resource(subcommand: &ResourceSubCommand, progress_format: ProgressFormat
554554
},
555555
ResourceSubCommand::Export { resource, version, input, file, output_format } => {
556556
dsc.find_resources(&[DiscoveryFilter::new(resource, version.clone())], progress_format);
557-
let parsed_input = get_input(input.as_ref(), file.as_ref(), false);
557+
let parsed_input = get_input(input.as_ref(), file.as_ref());
558558
resource_command::export(&mut dsc, resource, version.as_deref(), &parsed_input, output_format.as_ref());
559559
},
560560
ResourceSubCommand::Get { resource, version, input, file: path, all, output_format } => {
@@ -567,23 +567,23 @@ pub fn resource(subcommand: &ResourceSubCommand, progress_format: ProgressFormat
567567
error!("{}", t!("subcommand.jsonArrayNotSupported"));
568568
exit(EXIT_INVALID_ARGS);
569569
}
570-
let parsed_input = get_input(input.as_ref(), path.as_ref(), false);
570+
let parsed_input = get_input(input.as_ref(), path.as_ref());
571571
resource_command::get(&mut dsc, resource, version.as_deref(), &parsed_input, output_format.as_ref());
572572
}
573573
},
574574
ResourceSubCommand::Set { resource, version, input, file: path, output_format } => {
575575
dsc.find_resources(&[DiscoveryFilter::new(resource, version.clone())], progress_format);
576-
let parsed_input = get_input(input.as_ref(), path.as_ref(), false);
576+
let parsed_input = get_input(input.as_ref(), path.as_ref());
577577
resource_command::set(&mut dsc, resource, version.as_deref(), &parsed_input, output_format.as_ref());
578578
},
579579
ResourceSubCommand::Test { resource, version, input, file: path, output_format } => {
580580
dsc.find_resources(&[DiscoveryFilter::new(resource, version.clone())], progress_format);
581-
let parsed_input = get_input(input.as_ref(), path.as_ref(), false);
581+
let parsed_input = get_input(input.as_ref(), path.as_ref());
582582
resource_command::test(&mut dsc, resource, version.as_deref(), &parsed_input, output_format.as_ref());
583583
},
584584
ResourceSubCommand::Delete { resource, version, input, file: path } => {
585585
dsc.find_resources(&[DiscoveryFilter::new(resource, version.clone())], progress_format);
586-
let parsed_input = get_input(input.as_ref(), path.as_ref(), false);
586+
let parsed_input = get_input(input.as_ref(), path.as_ref());
587587
resource_command::delete(&mut dsc, resource, version.as_deref(), &parsed_input);
588588
},
589589
}

dsc/src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ pub fn enable_tracing(trace_level_arg: Option<&TraceLevel>, trace_format_arg: Op
432432
info!("Trace-level is {:?}", tracing_setting.level);
433433
}
434434

435-
pub fn get_input(input: Option<&String>, file: Option<&String>, parameters_from_stdin: bool) -> String {
435+
pub fn get_input(input: Option<&String>, file: Option<&String>) -> String {
436436
trace!("Input: {input:?}, File: {file:?}");
437437
let value = if let Some(input) = input {
438438
debug!("{}", t!("util.readingInput"));

0 commit comments

Comments
 (0)