summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakka <jakka@jakka.su>2025-10-09 15:00:15 +0300
committerjakka <jakka@jakka.su>2025-10-09 15:00:15 +0300
commitacc7e926f64f940d4da60f47c1f73bab27a00571 (patch)
tree1e4b47dd74b1cb519934bbfc61602fd7b28fec9f
parentbca6b4fabf0b0b12d3e0f89a0854a5f98cc8cc96 (diff)
minor edit
-rw-r--r--src/files.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/files.rs b/src/files.rs
index e3a31ca..b27123a 100644
--- a/src/files.rs
+++ b/src/files.rs
@@ -70,7 +70,7 @@ async fn handle_file(file: &Path, conn: &Connection) -> Result<()> {
Ok(())
}
-pub(crate) async fn index_files_recursively(
+pub async fn index_files_recursively(
path: &Path,
conn: &Connection,
handler: Arc<AtomicBool>,
@@ -110,8 +110,10 @@ pub(crate) async fn index_files_recursively(
let _ = filesend.send(path.to_owned());
#[cfg(not(test))]
newbar.inc_length(1);
- } else {
- break;
+ } else {
+ break;
+ }
+ }
}
}
});
@@ -120,7 +122,7 @@ pub(crate) async fn index_files_recursively(
&& handler.load(Ordering::SeqCst)
{
#[allow(unused_variables)]
- if let Err(error) = smol::block_on( async {handle_file(&path, conn)}).await {
+ if let Err(error) = smol::block_on(async { handle_file(&path, conn) }).await {
#[cfg(not(test))]
bar.println(format!("{}", FileError::new(&path, error)));
} else {