Skip to content

Commit 14535f1

Browse files
author
Devdutt Shenoi
committed
ci: clippy suggestions
1 parent 7305873 commit 14535f1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/hottier.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ impl HotTierManager {
373373
*parquet_file_size += parquet_file.file_size;
374374
stream_hot_tier.used_size = *parquet_file_size;
375375

376-
stream_hot_tier.available_size = stream_hot_tier.available_size - parquet_file.file_size;
376+
stream_hot_tier.available_size -= parquet_file.file_size;
377377
self.put_hot_tier(stream, &mut stream_hot_tier).await?;
378378
file_processed = true;
379379
let path = self.get_stream_path_for_date(stream, &date);
@@ -400,7 +400,7 @@ impl HotTierManager {
400400
dates: &[NaiveDate],
401401
) -> Result<(), HotTierError> {
402402
for date in dates.iter() {
403-
let path = self.get_stream_path_for_date(stream, &date);
403+
let path = self.get_stream_path_for_date(stream, date);
404404
if path.exists() {
405405
fs::remove_dir_all(path.clone()).await?;
406406
}
@@ -594,8 +594,8 @@ impl HotTierManager {
594594
fs::remove_dir_all(path_to_delete.parent().unwrap()).await?;
595595
delete_empty_directory_hot_tier(path_to_delete.parent().unwrap()).await?;
596596

597-
stream_hot_tier.used_size = stream_hot_tier.used_size - file_size;
598-
stream_hot_tier.available_size = stream_hot_tier.available_size + file_size;
597+
stream_hot_tier.used_size -= file_size;
598+
stream_hot_tier.available_size += file_size;
599599
self.put_hot_tier(stream, stream_hot_tier).await?;
600600
delete_successful = true;
601601

src/utils/human_size.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ where
5555
D: Deserializer<'de>,
5656
{
5757
let s = String::deserialize(deserializer)?;
58-
human_size_to_bytes(&s).map_err(|e| de::Error::custom(e))
58+
human_size_to_bytes(&s).map_err(de::Error::custom)
5959
}

0 commit comments

Comments
 (0)