chore: use less mut variable
This commit is contained in:
@@ -54,9 +54,8 @@ fn main() {
|
||||
}));
|
||||
let keep_running_config = opt_value!(parse_keep_running_config());
|
||||
|
||||
let mut the_file_lock = None;
|
||||
if let Some(ref lock_file) = keep_running_config.lock_file {
|
||||
the_file_lock = match FileLock::lock(lock_file, false, true) {
|
||||
let the_file_lock = if let Some(ref lock_file) = keep_running_config.lock_file {
|
||||
match FileLock::lock(lock_file, false, true) {
|
||||
Ok(lock) => {
|
||||
info!("Lock file success: {}", lock_file);
|
||||
Some(lock)
|
||||
@@ -65,8 +64,8 @@ fn main() {
|
||||
warn!("Lock file failed: {}", lock_file);
|
||||
return;
|
||||
},
|
||||
};
|
||||
}
|
||||
} else { None };
|
||||
|
||||
init_logger();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user