Skip to content

Commit 7b1a928

Browse files
committed
add rt to fix tests
1 parent f2ad248 commit 7b1a928

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ reqwest = { version = "0.12.23", optional = true }
2626
serde = { version = "1.0.219", features = ["derive"] }
2727
serde_yaml = "0.9.34"
2828
tar = "0.4.44"
29-
tokio = { version = "1.47.1", optional = true }
29+
tokio = { version = "1.47.1", optional = true, features = ["rt"] }
3030
walkdir = "2.5.0"
3131

3232
[dev-dependencies]

src/chunks/tree.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,8 @@ pub fn install_tree(
113113
mirrors: &[String],
114114
hash_kind: HashKind,
115115
) -> Result<()> {
116-
use tokio::runtime::Runtime;
117-
118116
use crate::chunks::network::install_chunks;
117+
use tokio::runtime::Runtime;
119118

120119
let mut not_installed_chunks = Vec::new();
121120

src/repo/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,7 @@ pub fn get_all_installed_packages(repo_path: &Path) -> Result<Vec<PackageManifes
157157
let mut packages = Vec::new();
158158
let installed_path = &repo_path.join("installed");
159159

160-
if !installed_path.exists() {
161-
Ok(Vec::new())
162-
} else {
160+
if installed_path.exists() {
163161
// Check ID's and aliases
164162
for entry in fs::read_dir(installed_path)? {
165163
let file = entry?.path();
@@ -169,6 +167,8 @@ pub fn get_all_installed_packages(repo_path: &Path) -> Result<Vec<PackageManifes
169167
}
170168

171169
Ok(packages)
170+
} else {
171+
Ok(Vec::new())
172172
}
173173
}
174174

0 commit comments

Comments
 (0)