mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-12-03 06:22:32 -05:00
stop using old tempdir crate
This commit is contained in:
@@ -15,7 +15,7 @@ use rusqlite;
|
||||
use std::env;
|
||||
use std::sync::Arc;
|
||||
use std::thread;
|
||||
use tempdir::TempDir;
|
||||
use tempfile::TempDir;
|
||||
use time;
|
||||
use uuid::Uuid;
|
||||
|
||||
@@ -67,7 +67,10 @@ impl<C: Clocks + Clone> TestDb<C> {
|
||||
}
|
||||
|
||||
pub(crate) fn new_with_flush_if_sec(clocks: C, flush_if_sec: i64) -> Self {
|
||||
let tmpdir = TempDir::new("moonfire-nvr-test").unwrap();
|
||||
let tmpdir = tempfile::Builder::new()
|
||||
.prefix("moonfire-nvr-test")
|
||||
.tempdir()
|
||||
.unwrap();
|
||||
|
||||
let mut conn = rusqlite::Connection::open_in_memory().unwrap();
|
||||
db::init(&mut conn).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user