Skip to content

Commit 4de6b85

Browse files
deepsource fix
1 parent 43a4a58 commit 4de6b85

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/parseable/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ impl Parseable {
380380

381381
// Set hot tier fields from the stored metadata
382382
metadata.hot_tier_enabled = hot_tier_enabled;
383-
metadata.hot_tier = hot_tier.clone();
383+
metadata.hot_tier.clone_from(&hot_tier);
384384

385385
let ingestor_id = INGESTOR_META
386386
.get()
@@ -397,10 +397,6 @@ impl Parseable {
397397
// Set hot tier configuration in memory based on stored metadata
398398
if let Some(hot_tier_config) = hot_tier {
399399
stream.set_hot_tier(Some(hot_tier_config));
400-
} else if hot_tier_enabled {
401-
// Backward compatibility: if hot_tier_enabled is true but no hot_tier config exists,
402-
// mark it as enabled in the stream metadata
403-
stream.set_hot_tier(None);
404400
}
405401

406402
//commit schema in memory

src/parseable/streams.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ impl Stream {
924924

925925
pub fn set_hot_tier(&self, hot_tier: Option<StreamHotTier>) {
926926
let mut metadata = self.metadata.write().expect(LOCK_EXPECT);
927-
metadata.hot_tier = hot_tier.clone();
927+
metadata.hot_tier.clone_from(&hot_tier);
928928
metadata.hot_tier_enabled = hot_tier.is_some();
929929
}
930930

0 commit comments

Comments
 (0)