Skip to content

Commit e1bea6d

Browse files
committed
fix: resolve compile warnings across workspace
- Remove duplicate Duration import and use unqualified Duration in ssh.rs - Prefix unused default_image parameter with underscore in sandbox/mod.rs - Make SecretResolver pub to match its use in pub function signature
1 parent 94be3e1 commit e1bea6d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

crates/openshell-cli/src/ssh.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,8 @@ pub async fn sandbox_ssh_proxy(
701701
// exists but hasn't reached Ready phase yet. This is a transient state
702702
// after sandbox allocation — retry with backoff instead of failing
703703
// immediately.
704-
const MAX_CONNECT_WAIT: std::time::Duration = std::time::Duration::from_secs(60);
705-
const INITIAL_BACKOFF: std::time::Duration = std::time::Duration::from_secs(1);
704+
const MAX_CONNECT_WAIT: Duration = Duration::from_secs(60);
705+
const INITIAL_BACKOFF: Duration = Duration::from_secs(1);
706706

707707
let start = std::time::Instant::now();
708708
let mut backoff = INITIAL_BACKOFF;
@@ -734,7 +734,7 @@ pub async fn sandbox_ssh_proxy(
734734
"sandbox not yet ready (HTTP 412), retrying in {backoff:?}"
735735
);
736736
tokio::time::sleep(backoff).await;
737-
backoff = (backoff * 2).min(std::time::Duration::from_secs(8));
737+
backoff = (backoff * 2).min(Duration::from_secs(8));
738738
continue;
739739
}
740740
return Err(miette::miette!(

crates/openshell-sandbox/src/secrets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub(crate) struct RewriteTargetResult {
6262
// ---------------------------------------------------------------------------
6363

6464
#[derive(Debug, Clone, Default)]
65-
pub(crate) struct SecretResolver {
65+
pub struct SecretResolver {
6666
by_placeholder: HashMap<String, String>,
6767
}
6868

crates/openshell-server/src/sandbox/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,7 @@ fn sandbox_template_to_k8s(
962962
result
963963
}
964964

965+
965966
fn container_resources(template: &SandboxTemplate, gpu: bool) -> Option<serde_json::Value> {
966967
let mut resources =
967968
struct_to_json(&template.resources).unwrap_or_else(|| serde_json::json!({}));

0 commit comments

Comments
 (0)