ratatui_toolkit/widgets/markdown_widget/state/collapse_state/constructors/new.rs
1//! Constructor for CollapseState.
2
3use crate::widgets::markdown_widget::state::collapse_state::CollapseState;
4use std::collections::HashMap;
5
6impl CollapseState {
7 /// Create a new collapse state with no collapsed sections.
8 pub fn new() -> Self {
9 Self {
10 sections: HashMap::new(),
11 hierarchy: HashMap::new(),
12 }
13 }
14}