Skip to content

Commit

Permalink
config: update init function
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnxpl0it committed Dec 29, 2024
1 parent c992fd8 commit ac2f86c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cli/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl Config {
}
}

pub fn init(self, mut keywords: HashMap<String, String>) {
pub fn init(self, keywords: &mut HashMap<String, String>) {
// this sample is just a template that create config.toml and the new.toml template for the
// first time, Now something maybe confusing is the "initPJNAME" wtf is it ?
// That's just a way to workaround auto replacing PROJECTNAME in templates
Expand Down Expand Up @@ -65,7 +65,7 @@ content = '''

let template: Template = toml::from_str(&conf_template).unwrap();

Template::extract(template, &mut keywords);
Template::extract(template, &mut keywords.clone());
}

pub fn get_keywords(self) -> HashMap<String, String> {
Expand All @@ -88,7 +88,7 @@ content = '''
"INFO".bold().blue(),
"Looks like it's your first time running spark, creating config files and templates for you".green()
);
Self::init(self, keywords.clone());
Self::init(self, &mut keywords);
println!("");
}

Expand Down

0 comments on commit ac2f86c

Please sign in to comment.