Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop use of openat-ext, Rust std now has efficient std::io::copy #781

Merged
merged 1 commit into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ ignition-config = "0.2"
lazy_static = "^1.4"
libc = "^0.2"
nix = ">= 0.22, < 0.24"
openat-ext = ">= 0.1.4, < 0.3"
openssl = "^0.10"
pipe = ">= 0.3, < 0.5"
regex = ">= 1.4, < 1.6"
Expand Down
5 changes: 1 addition & 4 deletions src/live/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

use anyhow::{bail, Context, Result};
use nix::unistd::isatty;
use openat_ext::FileExt;
use std::fs::{write, File, OpenOptions};
use std::io::{self, copy, BufWriter, Seek, SeekFrom, Write};
use std::os::unix::io::AsRawFd;
Expand Down Expand Up @@ -62,9 +61,7 @@ pub(super) fn write_live_iso(
.tempfile_in(output_dir)
.context("creating temporary file")?;
input.seek(SeekFrom::Start(0)).context("seeking input")?;
input
.copy_to(output.as_file_mut())
.context("copying input to temporary file")?;
copy(input, output.as_file_mut()).context("copying input to temporary file")?;
iso.write(output.as_file_mut())?;
output
.persist_noclobber(&output_path)
Expand Down