aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authornotgne22021-08-04 01:04:23 -0700
committernotgne22021-08-12 00:18:06 -0700
commite5546f9c2503c26d175f08a81fc0a0f330be4cbe (patch)
tree416fd3a2c23aaefcba79a4161e6fa901f1882f9d /src/lib.rs
parentd72174307d5b88ec24cc2e69e875228fe3d642ed (diff)
General code cleanup
Diffstat (limited to '')
-rw-r--r--src/lib.rs6
1 files changed, 3 insertions, 3 deletions
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,