Skip to content

Commit 66d57d4

Browse files
MiseiMisei
authored andcommitted
fix: Remove unused RetentionCohort structs to resolve dead_code warnings
1 parent aa0d735 commit 66d57d4

File tree

2 files changed

+3
-25
lines changed

2 files changed

+3
-25
lines changed

src-tauri/src/database/data_science_analytics.rs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -181,26 +181,6 @@ pub struct SegmentAvgScore {
181181
pub user_count: i64,
182182
}
183183

184-
/// Retention cohort result
185-
#[derive(Debug, Clone, Serialize, Deserialize)]
186-
#[serde(rename_all = "camelCase")]
187-
pub struct RetentionCohortResult {
188-
pub cohorts: Vec<RetentionCohort>,
189-
pub overall_retention: f64,
190-
}
191-
192-
#[derive(Debug, Clone, Serialize, Deserialize)]
193-
#[serde(rename_all = "camelCase")]
194-
pub struct RetentionCohort {
195-
pub cohort_week: String,
196-
pub cohort_size: i64,
197-
pub week_0: f64,
198-
pub week_1: f64,
199-
pub week_2: f64,
200-
pub week_3: f64,
201-
pub week_4: f64,
202-
}
203-
204184
// ============================================================================
205185
// Phase 4: Anomaly Detection
206186
// ============================================================================
@@ -565,10 +545,7 @@ pub fn get_emote_analysis(
565545

566546
for emote in emotes {
567547
*emote_counts.entry(emote.clone()).or_insert(0) += 1;
568-
emote_users
569-
.entry(emote)
570-
.or_default()
571-
.push(user.clone());
548+
emote_users.entry(emote).or_default().push(user.clone());
572549
}
573550
}
574551

src-tauri/src/websocket/twitch_irc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ impl TwitchIrcManager {
116116
}
117117

118118
// バッチフラッシュ(100件または5秒ごと)
119-
if (batch.len() >= 100 || last_flush.elapsed().as_secs() >= 5) && !batch.is_empty() {
119+
if (batch.len() >= 100 || last_flush.elapsed().as_secs() >= 5) && !batch.is_empty()
120+
{
120121
Self::flush_batch(&db_conn_clone, &mut batch, &logger_clone).await;
121122
last_flush = std::time::Instant::now();
122123
}

0 commit comments

Comments
 (0)