Skip to content

Hoist function-body use statements to module level#184

Merged
Shine-neko merged 1 commit into
mainfrom
chore/hoist-use-statements
Jul 3, 2026
Merged

Hoist function-body use statements to module level#184
Shine-neko merged 1 commit into
mainfrom
chore/hoist-use-statements

Conversation

@Shine-neko

Copy link
Copy Markdown
Contributor

Moves use statements that were declared inside function bodies up to module level, keeping imports in one place per file.

Ten imports were hoisted across six files; the #[cfg(unix)] guard on OpenOptionsExt is preserved so non-unix builds are unaffected. Test-module imports (use super::*; and friends inside #[cfg(test)]) are left as-is, since that is the standard Rust idiom.

Files touched:

  • models/deployments.rsstd::str::FromStr
  • commands/init.rsstd::os::unix::fs::OpenOptionsExt
  • runtime/containerd/image.rsbase64::Engine
  • runtime/firecracker/lifecycle.rsGuestMount, volume_image, nix signal/pid
  • runtime/cloud_hypervisor/lifecycle.rstokio::io::AsyncReadExt, futures::stream, HealthCheckStatus
  • api/action/login.rstoken (into the test module)

cargo check passes with no errors or unused-import warnings.

@Shine-neko Shine-neko merged commit c4cd181 into main Jul 3, 2026
5 checks passed
@Shine-neko Shine-neko deleted the chore/hoist-use-statements branch July 3, 2026 22:25
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