Replace deprecated tempdir dependency with tempfile (#11588)
`Tempdir` is deprecated, but the functionality has been merged into another crate: `tempfile`. This commit removes all `tempdir` dependencies and replaces them with `tempfile` and the equivalent bindings. Fixes #11560
This commit is contained in:
@@ -42,7 +42,7 @@ spec = { path = "../spec" }
|
||||
|
||||
# Benches
|
||||
ethash = { package = "ethash-engine", path = "../engines/ethash" }
|
||||
tempdir = "0.3.7"
|
||||
tempfile = "3.1"
|
||||
|
||||
[features]
|
||||
# Used to selectively expose code for benchmarks.
|
||||
|
||||
@@ -24,7 +24,7 @@ use ethash::{EthashParams, Ethash};
|
||||
use ethereum_types::U256;
|
||||
use ethcore::test_helpers::TestBlockChainClient;
|
||||
use spec::new_constantinople_test_machine;
|
||||
use tempdir::TempDir;
|
||||
use tempfile::TempDir;
|
||||
|
||||
use ::verification::{
|
||||
FullFamilyParams,
|
||||
@@ -72,7 +72,7 @@ fn ethash_params() -> EthashParams {
|
||||
fn build_ethash() -> Ethash {
|
||||
let machine = new_constantinople_test_machine();
|
||||
let ethash_params = ethash_params();
|
||||
let cache_dir = TempDir::new("").unwrap();
|
||||
let cache_dir = TempDir::new().unwrap();
|
||||
Ethash::new(
|
||||
cache_dir.path(),
|
||||
ethash_params,
|
||||
|
||||
Reference in New Issue
Block a user