Skip to content

Commit a5b8f02

Browse files
committed
Drop use of openat-ext, Rust std now has efficient std::io::copy
See rust-lang/rust#75272
1 parent 90eed71 commit a5b8f02

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed

Cargo.lock

-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ ignition-config = "0.2"
5252
lazy_static = "^1.4"
5353
libc = "^0.2"
5454
nix = ">= 0.22, < 0.24"
55-
openat-ext = ">= 0.1.4, < 0.3"
5655
openssl = "^0.10"
5756
pipe = ">= 0.3, < 0.5"
5857
regex = ">= 1.4, < 1.6"

src/live/util.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
use anyhow::{bail, Context, Result};
1616
use nix::unistd::isatty;
17-
use openat_ext::FileExt;
1817
use std::fs::{write, File, OpenOptions};
1918
use std::io::{self, copy, BufWriter, Seek, SeekFrom, Write};
2019
use std::os::unix::io::AsRawFd;
@@ -62,8 +61,7 @@ pub(super) fn write_live_iso(
6261
.tempfile_in(output_dir)
6362
.context("creating temporary file")?;
6463
input.seek(SeekFrom::Start(0)).context("seeking input")?;
65-
input
66-
.copy_to(output.as_file_mut())
64+
std::io::copy(input, output.as_file_mut())
6765
.context("copying input to temporary file")?;
6866
iso.write(output.as_file_mut())?;
6967
output

0 commit comments

Comments
 (0)