feat: enhance strictness of Rust compiler settings and improve code quality by treating warnings as errors
This commit is contained in:
@@ -6,7 +6,6 @@ pub mod editor;
|
||||
pub mod effort;
|
||||
pub mod key_input;
|
||||
pub mod mcp;
|
||||
pub mod workflow;
|
||||
|
||||
pub mod quit_confirm;
|
||||
pub mod rewind;
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
//! Workflow-mode helper logic for the TUI workflow overlay.
|
||||
//!
|
||||
//! Flow: exposes a dismiss handler invoked by a keybinding to close the
|
||||
//! workflow overlay, and a status query used elsewhere to check whether
|
||||
//! it is currently showing.
|
||||
|
||||
use crate::app::state::rest::AppStateRest;
|
||||
use crate::app::state::types::Overlay;
|
||||
|
||||
/// Close the workflow overlay if it is the currently active overlay.
|
||||
///
|
||||
/// Flow: check `state.misc.overlay == Overlay::Workflow`, reset to `Overlay::None`
|
||||
/// if so, then mark state dirty regardless.
|
||||
///
|
||||
/// Why: no-ops safely if another overlay is showing, so it can be called
|
||||
/// unconditionally from a dismiss keybinding.
|
||||
///
|
||||
/// Return: nothing; mutates `state.misc.overlay` and `state.dirty` in place.
|
||||
pub fn handle_workflow_dismiss(state: &mut AppStateRest) {
|
||||
if state.misc.overlay == Overlay::Workflow {
|
||||
state.misc.overlay = Overlay::None;
|
||||
}
|
||||
state.dirty = true;
|
||||
}
|
||||
|
||||
/// Report whether the workflow overlay is currently displayed.
|
||||
///
|
||||
/// Flow: compare `state.misc.overlay` against `Overlay::Workflow`.
|
||||
///
|
||||
/// Return: `"active"` if the workflow overlay is shown, `"idle"` otherwise.
|
||||
pub fn workflow_status(state: &AppStateRest) -> &str {
|
||||
if state.misc.overlay == Overlay::Workflow {
|
||||
"active"
|
||||
} else {
|
||||
"idle"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user