Skip to content

Commit

Permalink
Use tempfile crate instead of tempdir
Browse files Browse the repository at this point in the history
tempdir is deprecated

fixes #23
  • Loading branch information
gifnksm committed Aug 24, 2022
1 parent e4145d8 commit 19db08d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ edition = "2021"
[dependencies]
cli-xtask = { path = "../", default-features = false, features = ["main", "lib-crate-extra", "subcommand-exec"] }
dir-diff = "0.3.2"
tempdir = "0.3.7"
tempfile = "3.3.0"
4 changes: 2 additions & 2 deletions xtask/src/lint_doc.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use tempdir::TempDir;
use tempfile::TempDir;

use cli_xtask::{
camino::Utf8Path, clap, config::Config, eyre::eyre, tracing, workspace, Error, Result,
Expand All @@ -18,7 +18,7 @@ impl LintDoc {
let workspace = workspace::current();
let doc_dir = workspace.workspace_root.join("doc");

let reference_dir = TempDir::new("reference")?;
let reference_dir = TempDir::new()?;
super::tidy_doc::emit_doc(workspace, <&Utf8Path>::try_from(reference_dir.path())?)?;

if dir_diff::is_different(&doc_dir, &reference_dir).map_err(|e| -> Error {
Expand Down

0 comments on commit 19db08d

Please sign in to comment.