chore: clippy, fmt

This commit is contained in:
sprites0
2025-08-24 01:15:36 -04:00
parent d61020e996
commit 19f35a6b54
2 changed files with 7 additions and 22 deletions

View File

@ -71,27 +71,12 @@ impl BlockSource for S3BlockSource {
let client = self.client.clone(); let client = self.client.clone();
let bucket = self.bucket.clone(); let bucket = self.bucket.clone();
async move { async move {
let (_, first_level) = Self::pick_path_with_highest_number( let (_, first_level) =
&client, Self::pick_path_with_highest_number(&client, &bucket, "", true).await?;
&bucket, let (_, second_level) =
"", Self::pick_path_with_highest_number(&client, &bucket, &first_level, true).await?;
true, let (block_number, third_level) =
) Self::pick_path_with_highest_number(&client, &bucket, &second_level, false).await?;
.await?;
let (_, second_level) = Self::pick_path_with_highest_number(
&client,
&bucket,
&first_level,
true,
)
.await?;
let (block_number, third_level) = Self::pick_path_with_highest_number(
&client,
&bucket,
&second_level,
false,
)
.await?;
info!("Latest block number: {} with path {}", block_number, third_level); info!("Latest block number: {} with path {}", block_number, third_level);
Some(block_number) Some(block_number)

View File

@ -1,4 +1,4 @@
/// Shared utilities for block sources //! Shared utilities for block sources
/// Finds the file/directory with the largest number in its name from a list of files /// Finds the file/directory with the largest number in its name from a list of files
pub fn name_with_largest_number(files: &[String], is_dir: bool) -> Option<(u64, String)> { pub fn name_with_largest_number(files: &[String], is_dir: bool) -> Option<(u64, String)> {