Skip to content

Commit

Permalink
chore: remove dependency on deprecated crate tempdir
Browse files Browse the repository at this point in the history
  • Loading branch information
oddlama committed Mar 8, 2023
1 parent f7214a3 commit 0e62fa7
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 86 deletions.
150 changes: 67 additions & 83 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ itertools = "0.10.5"
strum = { version = "0.24.1", features = ["derive"] }
rusqlite = { version = "0.28.0", optional = true }
toml = "0.7.2"
tempdir = "0.3.7"
tempfile = "3"
uuid = { version = "1.3.0", features = ["v4"], optional = true }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions src/bin/autokernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::process::Command;
use anyhow::{anyhow, ensure, Context, Ok, Result};
use clap::Parser;
use colored::Colorize;
use tempdir::TempDir;
use tempfile::tempdir;

/// Autokernel is a tool for managing your kernel configuration that guarantees semantic correctness.
/// It checks symbol assignments for validity by creating a native bridge to the kernel's
Expand Down Expand Up @@ -163,7 +163,7 @@ fn build_kernel(args: &Args, bridge: &Bridge, action: &ActionBuild) -> Result<()
script::apply(&config.config.script, bridge)?;
validate_transactions(&bridge.history.borrow())?;

let tmpdir = TempDir::new("autokernel")?;
let tmpdir = tempdir()?;
let config_output = args.kernel_dir.join(".config");
let initramfs_out = tmpdir.path().join("initramfs.img");

Expand Down

0 comments on commit 0e62fa7

Please sign in to comment.