Skip to content

Commit e4cea7b

Browse files
jeckersbcgwalters
authored andcommitted
Minor cleanup of build warnings
There's plenty of other stuff that clippy complains about, but these are the things bad enough that a bare `cargo build` or `cargo check` was warning on. Signed-off-by: John Eckersberg <[email protected]>
1 parent d576486 commit e4cea7b

File tree

4 files changed

+2
-25
lines changed

4 files changed

+2
-25
lines changed

crates/kit/src/cli_json.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Export CLI structure as JSON for documentation generation
2+
#![cfg(feature = "docgen")]
23

3-
#[cfg(feature = "docgen")]
44
use clap::Command;
55
use serde::{Deserialize, Serialize};
66

@@ -36,7 +36,6 @@ pub struct CliPositional {
3636
}
3737

3838
/// Convert a clap Command to our JSON representation
39-
#[cfg(feature = "docgen")]
4039
pub fn command_to_json(cmd: &Command) -> CliCommand {
4140
let mut options = Vec::new();
4241
let mut positionals = Vec::new();
@@ -128,7 +127,6 @@ pub fn command_to_json(cmd: &Command) -> CliCommand {
128127
}
129128

130129
/// Dump the complete CLI structure as JSON
131-
#[cfg(feature = "docgen")]
132130
pub fn dump_cli_json() -> color_eyre::Result<String> {
133131
use clap::CommandFactory;
134132

crates/kit/src/container_entrypoint.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use clap::{Parser, Subcommand};
22
use color_eyre::Result;
3-
use serde::{Deserialize, Serialize};
43
use tokio::signal::unix::SignalKind;
54
use tracing::debug;
65

@@ -34,16 +33,6 @@ pub struct SshOpts {
3433
#[derive(Parser)]
3534
pub struct MonitorStatusOpts {}
3635

37-
/// Configuration passed via BCK_CONFIG environment variable
38-
#[derive(Serialize, Deserialize)]
39-
pub struct ContainerConfig {
40-
pub memory_mb: u32,
41-
pub vcpus: u32,
42-
pub console: bool,
43-
pub extra_args: Option<String>,
44-
// Future: SSH config, etc.
45-
}
46-
4736
pub async fn run_ephemeral_in_container() -> Result<()> {
4837
// Parse BCK_CONFIG from environment
4938
let config_json = std::env::var("BCK_CONFIG")?;

crates/kit/src/libvirt/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ fn create_libvirt_domain_from_disk(
674674
if !opts.volumes.is_empty() {
675675
debug!("Processing {} volume mount(s)", opts.volumes.len());
676676

677-
for (idx, volume_str) in opts.volumes.iter().enumerate() {
677+
for volume_str in opts.volumes.iter() {
678678
let (host_path, tag) = parse_volume_mount(volume_str)
679679
.with_context(|| format!("Failed to parse volume mount '{}'", volume_str))?;
680680

crates/kit/src/supervisor_status.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,6 @@ pub enum SupervisorState {
2727
Ready,
2828
}
2929

30-
#[derive(Debug, Clone, Serialize, Deserialize)]
31-
pub struct VmInfo {
32-
/// Whether SSH is available
33-
pub ssh_available: bool,
34-
/// Port number for SSH if forwarded
35-
pub ssh_port: Option<u16>,
36-
/// IP address if available
37-
pub ip_address: Option<String>,
38-
}
39-
4030
impl SupervisorStatus {
4131
/// Create a new status with the given state
4232
pub fn new(state: SupervisorState) -> Self {

0 commit comments

Comments
 (0)