Skip to content

Commit

Permalink
fix: update arguments to remove borrow error (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
InioX committed Jun 29, 2024
1 parent 7464d6e commit 60f5926
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ fn main() -> Result<(), Report> {
&default_scheme,
&config.config.custom_keywords,
&args.prefix,
config.config.default_value,
&config.config.default_value,
)?;

if config.config.reload_apps == Some(true) {
Expand Down
5 changes: 3 additions & 2 deletions src/util/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl Template {
default_scheme: &SchemesEnum,
custom_keywords: &Option<HashMap<String, String>>,
path_prefix: &Option<PathBuf>,
default_fill_value: Option<String>
default_fill_value: &Option<String>
) -> Result<(), Report> {
let default_prefix = "@".to_string();

Expand Down Expand Up @@ -151,7 +151,8 @@ impl Template {
colors: &colors, image: image, custom: &custom,
};

let default_fill_value = default_fill_value.unwrap_or(String::from("-"));
let fill = String::from("-");
let default_fill_value = default_fill_value.as_ref().unwrap_or(&fill);

// debug!("render_data: {:#?}", &render_data);

Expand Down

0 comments on commit 60f5926

Please sign in to comment.