fix(protocol): Keymap is a test-only import, and my clippy check was not CI's

CI's `cargo clippy --workspace --all-targets -- -D warnings` failed on an
unused `Keymap` import: `bound_commands` takes a `&Keymap` and lives in the
test module, so the non-test lib build has no use for it. Moved into
`mod tests`.

Worth recording WHY I did not catch it locally: I ran clippy without
`-D warnings` and grepped its output for `^(error|warning)\[`, which matches a
lint with a NAME in brackets and misses a bare `warning:` — which is exactly
what `unused_imports` emits. A check whose filter cannot see the failure reads
as a clean run, which is the shape this repo keeps finding. Run the gate CI
runs, not one that looks like it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FC2jVn8Au7E9JPkw6bwXXH
This commit is contained in:
Edward Langley
2026-09-20 17:13:38 -07:00
parent be01339039
commit df8ee0d135
+2 -1
View File
@@ -4,7 +4,7 @@
use improvise_core::view::Axis;
use crate::client::ClientState;
use crate::keymap::{Binding, Keymap, Keymaps, ModeKey};
use crate::keymap::{Binding, Keymaps, ModeKey};
use crate::viewmodel::{CatTreeEntry, flatten_cat_tree};
use crate::{
AppMode, CellId, CellValue, Command, CreateKind, GridExtent, HelpPage, KeyCode, KeyEvent,
@@ -1109,6 +1109,7 @@ fn commit_buffer(state: &ClientState, kind: CommitKind) -> Option<Vec<Command>>
#[cfg(test)]
mod tests {
use super::*;
use crate::keymap::Keymap;
use crate::{AxisFrame, CellDisplay, GridUpdate, KeyModifiers, Projection, Snapshot};
fn ev(code: KeyCode) -> KeyEvent {