mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-21 13:08:42 +00:00
Use tempfile::NamedTempFile
in unit test of binstall_v1
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
3cd9866d32
commit
3f72e9b81a
1 changed files with 3 additions and 3 deletions
|
@ -230,7 +230,7 @@ mod test {
|
|||
use super::*;
|
||||
use crate::target::TARGET;
|
||||
|
||||
use tempfile::TempDir;
|
||||
use tempfile::NamedTempFile;
|
||||
|
||||
macro_rules! assert_records_eq {
|
||||
($records:expr, $metadata_set:expr) => {
|
||||
|
@ -245,8 +245,8 @@ mod test {
|
|||
fn rw_test() {
|
||||
let target = CompactString::from(TARGET);
|
||||
|
||||
let tempdir = TempDir::new().unwrap();
|
||||
let path = tempdir.path().join("binstall-tests.json");
|
||||
let named_tempfile = NamedTempFile::new().unwrap();
|
||||
let path = named_tempfile.path();
|
||||
|
||||
let metadata_vec = [
|
||||
MetaData {
|
||||
|
|
Loading…
Add table
Reference in a new issue