Skip to content

Commit a523997

Browse files
committed
fix comment and rename function
1 parent 3c0291a commit a523997

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dsc/src/resolve.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ pub struct Include {
3131
///
3232
/// # Returns
3333
///
34-
/// A tuple containing the path to the parameters file specified in the Include input and the content of
35-
/// the file as a JSON string.
34+
/// A tuple containing the contents of the parameters file as JSON and the configuration content
35+
/// as a JSON string.
3636
///
3737
/// # Errors
3838
///
3939
/// This function will return an error if the Include input is not valid JSON, if the file
4040
/// specified in the Include input cannot be read, or if the content of the file cannot be
4141
/// deserialized as YAML or JSON.
42-
pub fn get_config(input: &str) -> Result<(Option<String>, String), String> {
42+
pub fn get_contents(input: &str) -> Result<(Option<String>, String), String> {
4343
debug!("Processing Include input");
4444

4545
// deserialize the Include input

dsc/src/subcommand.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT License.
33

44
use crate::args::{ConfigSubCommand, DscType, OutputFormat, ResourceSubCommand};
5-
use crate::resolve::get_config;
5+
use crate::resolve::get_contents;
66
use crate::resource_command::{get_resource, self};
77
use crate::Stream;
88
use crate::tablewriter::Table;
@@ -229,7 +229,7 @@ pub fn config(subcommand: &ConfigSubCommand, parameters: &Option<String>, stdin:
229229
ConfigSubCommand::Resolve { document, path, .. } => {
230230
let new_path = initialize_config_root(path);
231231
let input = get_input(document, stdin, &new_path);
232-
let (new_parameters, config_json) = match get_config(&input) {
232+
let (new_parameters, config_json) = match get_contents(&input) {
233233
Ok((parameters, config_json)) => (parameters, config_json),
234234
Err(err) => {
235235
error!("{err}");

0 commit comments

Comments
 (0)