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:
@@ -24,7 +24,7 @@ accounts = { package = "ethcore-accounts", path = "../../../accounts" }
|
||||
engine = { path = "../../engine", features = ["test-helpers"] }
|
||||
ethcore = { path = "../..", features = ["test-helpers"] }
|
||||
keccak-hash = "0.4.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3.1"
|
||||
spec = { path = "../../spec" }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -230,12 +230,12 @@ mod tests {
|
||||
header::Header,
|
||||
engines::{Seal, SealingState}
|
||||
};
|
||||
use tempdir::TempDir;
|
||||
use tempfile::TempDir;
|
||||
|
||||
/// Create a new test chain spec with `BasicAuthority` consensus engine.
|
||||
fn new_test_authority() -> Spec {
|
||||
let bytes: &[u8] = include_bytes!("../res/basic_authority.json");
|
||||
let tempdir = TempDir::new("").unwrap();
|
||||
let tempdir = TempDir::new().unwrap();
|
||||
Spec::load(&tempdir.path(), bytes).expect("invalid chain spec")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user