Skip to content

refactor: move inline imports to module level (batch 4)#822

Merged
max-sixty merged 3 commits intomainfrom
imports
Jan 23, 2026
Merged

refactor: move inline imports to module level (batch 4)#822
max-sixty merged 3 commits intomainfrom
imports

Conversation

@max-sixty
Copy link
Owner

Summary

  • Final batch of import reorganization
  • Moves remaining inline imports from src/commands/list/, src/commands/select/, src/commands/config/, src/main.rs, and src/shell_exec.rs to module top level
  • Net reduction of 29 lines due to consolidation

Test plan

  • cargo check passes
  • pre-commit run --all-files passes
  • All 2058 tests pass

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 3 commits January 23, 2026 11:55
Move imports from function scope to module top level in src/commands/:
- mod.rs: cformat, styling helpers
- step_commands.rs: fs, ErrorKind, GitignoreBuilder, approve_hooks,
  StageMode, Cmd
- statusline.rs: IsTerminal, Component, AnsiStr, fix_dim_after_color_reset
- command_approval.rs: io, IsTerminal, Write, Path
- configure_shell.rs: HashSet, Style, eprint
- hook_commands.rs: HashMap, approve_hooks_filtered, build_hook_context
- worktree/resolve.rs: canonicalize

This is the third of four batches moving inline imports to follow Rust
conventions. Function-local imports remain where strictly necessary
(e.g., test-only imports within #[cfg(test)] modules).

Co-Authored-By: Claude <noreply@anthropic.com>
Final batch of import reorganization. Moves remaining inline imports
to the top of their respective modules for consistency and better
visibility.

Files modified:
- src/commands/config/show.rs
- src/commands/list/ci_status/{cache,mod}.rs
- src/commands/list/collect/{mod,results,tasks}.rs
- src/commands/list/{layout,mod,progressive}.rs
- src/commands/list/model/statusline_segment.rs
- src/commands/mod.rs
- src/commands/select/{items,log_formatter,mod,pager}.rs
- src/main.rs
- src/shell_exec.rs

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty max-sixty merged commit ccb27fe into main Jan 23, 2026
21 checks passed
@max-sixty max-sixty deleted the imports branch January 23, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant