Skip to content

Commit bb2f62e

Browse files
committed
fix(tui): remove unused next_id field from ToastManager
The next_id field became dead code when toast notifications were disabled and push() was changed to a no-op returning 0 immediately. This fixes the Clippy dead_code warning in CI.
1 parent 3cb16c8 commit bb2f62e

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/cortex-tui-components/src/toast.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,6 @@ pub enum ToastPosition {
234234
pub struct ToastManager {
235235
/// Active toasts (newest first)
236236
toasts: Vec<Toast>,
237-
/// Counter for generating unique toast IDs
238-
next_id: u64,
239237
/// Maximum number of toasts to display at once
240238
max_visible: usize,
241239
/// Screen position for toast display
@@ -251,7 +249,6 @@ impl ToastManager {
251249
pub fn new() -> Self {
252250
Self {
253251
toasts: Vec::new(),
254-
next_id: 1,
255252
max_visible: 5,
256253
position: ToastPosition::TopRight,
257254
}

src/cortex-tui/src/widgets/toast.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ pub enum ToastPosition {
233233
pub struct ToastManager {
234234
/// Active toasts (newest first)
235235
toasts: Vec<Toast>,
236-
/// Counter for generating unique toast IDs
237-
next_id: u64,
238236
/// Maximum number of toasts to display at once
239237
max_visible: usize,
240238
/// Screen position for toast display
@@ -250,7 +248,6 @@ impl ToastManager {
250248
pub fn new() -> Self {
251249
Self {
252250
toasts: Vec::new(),
253-
next_id: 1,
254251
max_visible: 5,
255252
position: ToastPosition::TopRight,
256253
}

0 commit comments

Comments
 (0)