diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-26 17:30:11 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-26 17:30:11 +0200 |
commit | 8bebe4c76107d8b0a55fda238b0475469d374d77 (patch) | |
tree | f16f7ea339af3c442e5daddf9c6ba0c8119a1a29 /crates/runner/src/init.rs | |
parent | e57b743058836ef34d4dd96fca5d6152f910140c (diff) | |
download | rebel-8bebe4c76107d8b0a55fda238b0475469d374d77.tar rebel-8bebe4c76107d8b0a55fda238b0475469d374d77.zip |
Switch to 2021 edition
Diffstat (limited to 'crates/runner/src/init.rs')
-rw-r--r-- | crates/runner/src/init.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/runner/src/init.rs b/crates/runner/src/init.rs index 783faf4..b2ebbe3 100644 --- a/crates/runner/src/init.rs +++ b/crates/runner/src/init.rs @@ -14,23 +14,23 @@ fn prepare_rootfs(rootfs: &str) -> Result<()> { mount::mount::<_, _, str, str>(Some(rootfs), rootfs, None, MsFlags::MS_BIND, None) .context("Failed to bind mount container rootfs")?; - for dir in IntoIterator::into_iter(["pts", "shm"]) { + for dir in ["pts", "shm"] { fs::mkdir(paths::join(&[rootfs, "dev", dir]))?; } - for (link, target) in IntoIterator::into_iter([ + for (link, target) in [ ("fd", "/proc/self/fd"), ("stdin", "/proc/self/fd/0"), ("stdout", "/proc/self/fd/1"), ("stderr", "/proc/self/fd/2"), ("ptmx", "pts/ptmx"), - ]) { + ] { let path = paths::join(&[rootfs, "dev", link]); std::os::unix::fs::symlink(target, &path) .with_context(|| format!("Failed to create link {}", path))?; } - for dev in IntoIterator::into_iter(["null", "zero", "full", "random", "urandom", "tty"]) { + for dev in ["null", "zero", "full", "random", "urandom", "tty"] { let source = paths::join(&["/dev", dev]); let target = paths::join(&[rootfs, "dev", dev]); fs::create(&target)?; |