From 00e4655ef2ad554c990016da671dfd16193bc898 Mon Sep 17 00:00:00 2001 From: eatradish Date: Tue, 6 Aug 2024 13:48:55 +0800 Subject: [PATCH] lint --- src/actions/onboarding.rs | 3 ++- src/repo/monitor.rs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/actions/onboarding.rs b/src/actions/onboarding.rs index 51c9be8..5f4d2d9 100644 --- a/src/actions/onboarding.rs +++ b/src/actions/onboarding.rs @@ -19,7 +19,8 @@ use super::{load_os, mount_fs}; pub fn onboarding(custom_tarball: Option<&String>, arch: Option<&str>) -> Result<()> { ctrlc::set_handler(move || { let _ = Term::stderr().show_cursor(); - }).expect("Error setting Ctrl-C handler"); + }) + .expect("Error setting Ctrl-C handler"); let theme = ColorfulTheme::default(); info!("Welcome to ciel!"); diff --git a/src/repo/monitor.rs b/src/repo/monitor.rs index d439e46..91aac19 100644 --- a/src/repo/monitor.rs +++ b/src/repo/monitor.rs @@ -1,4 +1,6 @@ +use crate::info; use anyhow::Result; +use console::style; use fs3::FileExt; use inotify::{Inotify, WatchMask}; use std::{ @@ -10,8 +12,6 @@ use std::{ thread::sleep, time::Duration, }; -use crate::info; -use console::style; use super::refresh_repo; @@ -70,7 +70,7 @@ fn refresh_once(pool_path: &Path) -> Result<()> { pub fn start_monitor(pool_path: &Path, stop_token: Receiver<()>) -> Result<()> { // ensure lock exists - let lock_path = pool_path.join(LOCK_FILE); + let lock_path = pool_path.join(LOCK_FILE); if !Path::exists(&lock_path) { File::create(&lock_path)?; info!("Creating lock file at {}...", LOCK_FILE);