Skip to content

Commit 0bd6c95

Browse files
committed
chore: rustfmt
Signed-off-by: Jiaxiao (mossaka) Zhou <[email protected]>
1 parent 98322f8 commit 0bd6c95

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

containerd-shim-spin/src/engine.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,17 @@ impl Engine for SpinEngine {
6262

6363
fn run_wasi(&self, ctx: &impl RuntimeContext, stdio: Stdio) -> Result<i32> {
6464
stdio.redirect()?;
65-
65+
6666
// Set the container environment variables which will be collected by Spin's
67-
// [environment variable provider].
67+
// [environment variable provider].
6868
// TODO: This is a temporary solution to allow Spin to collect the container environment variables.
6969
// We should later look into other variable providers to collect container variables.
7070
//
7171
// [environment variable provider]: https://github.com/fermyon/spin/blob/v3.0.0/crates/variables/src/env.rs
72-
ctx.envs()
73-
.iter()
74-
.for_each(|v| {
75-
let (key, value) = v.split_once('=').unwrap_or((v.as_str(), ""));
76-
env::set_var(key, value);
77-
});
72+
ctx.envs().iter().for_each(|v| {
73+
let (key, value) = v.split_once('=').unwrap_or((v.as_str(), ""));
74+
env::set_var(key, value);
75+
});
7876

7977
info!("setting up wasi");
8078
let rt = Runtime::new().context("failed to create runtime")?;

0 commit comments

Comments
 (0)