From e5546f9c2503c26d175f08a81fc0a0f330be4cbe Mon Sep 17 00:00:00 2001 From: notgne2 Date: Wed, 4 Aug 2021 01:04:23 -0700 Subject: General code cleanup --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 08dcccd..981ec1e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,7 @@ pub fn make_lock_path(temp_path: &str, closure: &str) -> String { format!("{}/deploy-rs-canary-{}", temp_path, lock_hash) } -fn make_emoji(level: log::Level) -> &'static str { +const fn make_emoji(level: log::Level) -> &'static str { match level { log::Level::Error => "❌", log::Level::Warn => "⚠️", @@ -102,9 +102,9 @@ pub enum LoggerType { pub fn init_logger( debug_logs: bool, log_dir: Option<&str>, - logger_type: LoggerType, + logger_type: &LoggerType, ) -> Result<(), FlexiLoggerError> { - let logger_formatter = match logger_type { + let logger_formatter = match &logger_type { LoggerType::Deploy => logger_formatter_deploy, LoggerType::Activate => logger_formatter_activate, LoggerType::Wait => logger_formatter_wait, -- cgit v1.2.3