Replace tempdir crate with tempfile

This commit is contained in:
Julian Braha 2024-01-24 17:58:09 +00:00
parent f8604e88ef
commit fd6f71d287
15 changed files with 78 additions and 119 deletions

View file

@ -56,7 +56,7 @@ node_runtime = { path = "../node_runtime"}
pretty_assertions.workspace = true
rand.workspace = true
unindent.workspace = true
tempdir.workspace = true
tempfile.workspace = true
ctor.workspace = true
env_logger.workspace = true

View file

@ -63,7 +63,9 @@ async fn test_semantic_index(cx: &mut TestAppContext) {
languages.add(rust_language);
languages.add(toml_language);
let db_dir = tempdir::TempDir::new("vector-store").unwrap();
let db_dir = tempfile::Builder::new()
.prefix("vector-store")
.tempdir();
let db_path = db_dir.path().join("db.sqlite");
let embedding_provider = Arc::new(FakeEmbeddingProvider::default());