Skip to content

Commit

Permalink
fix: remove compilation errors on unix
Browse files Browse the repository at this point in the history
  • Loading branch information
InioX committed Dec 14, 2023
1 parent 656e97e commit 040fff9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ fn main() -> Result<(), Report> {
show_color(&schemes, &source_color);
}

if let Some(format) = args.json {
if let Some(ref format) = args.json {
dump_json(&schemes, &source_color, format);
}

if args.dry_run == Some(false) {
Template::generate(&schemes, &config.templates, &args.source, &config.config.prefix, &source_color, &default_scheme, config.config.custom_keywords)?;
Template::generate(&schemes, &config.templates, &args.source, &config.config.prefix, &source_color, &default_scheme, &config.config.custom_keywords)?;

if config.config.reload_apps == Some(true) {
#[cfg(any(target_os = "linux", target_os = "netbsd"))]
Expand Down
2 changes: 1 addition & 1 deletion src/util/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ fn hex(color: Color, prefix: bool) -> String {
)
}

pub fn dump_json(schemes: &Schemes, source_color: &[u8; 4], format: Format) {
pub fn dump_json(schemes: &Schemes, source_color: &[u8; 4], format: &Format) {
type F = Format;
let fmt = match format {
F::Rgb => |c: Color| format!("rgb({:?}, {:?}, {:?})", c.red, c.green, c.blue),
Expand Down
2 changes: 1 addition & 1 deletion src/util/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl Template {
prefix: &Option<String>,
source_color: &[u8; 4],
default_scheme: &SchemesEnum,
custom_keywords: Option<HashMap<String, CustomKeyword>>,
custom_keywords: &Option<HashMap<String, CustomKeyword>>,
) -> Result<(), Report> {
let default_prefix = "@".to_string();

Expand Down

0 comments on commit 040fff9

Please sign in to comment.