Skip to content

Commit 380efdf

Browse files
committed
test: fix tests
1 parent a364eac commit 380efdf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
use std::{
2-
env::temp_dir,
32
fs::{self, create_dir_all, rename},
4-
option,
53
os::unix::fs::{PermissionsExt, symlink},
64
path::Path,
75
};
86

9-
use crate::{artifacts::get_artifact, compression::decompress_file};
7+
use crate::artifacts::get_artifact;
108

119
mod artifacts;
1210
mod compression;
@@ -103,6 +101,7 @@ pub fn build(input_dir: &Path, repo_dir: &Path, artifact_name: &String) -> Resul
103101
Ok(manifest_hash)
104102
}
105103

104+
#[cfg(feature = "decoding")]
106105
pub fn install_artifact(artifact_name: &String, store_path: &Path, repo_cache_path: &Path) {
107106
assert!(store_path.is_absolute(), "Store path must be absolute!");
108107
assert!(
@@ -187,11 +186,14 @@ fn make_chunk_executable(chunk_hash: &String, store_path: &Path) {
187186
fs::set_permissions(&chunk_path, perms).expect("Unable to set executable bit!");
188187
}
189188

189+
#[cfg(feature = "decoding")]
190190
fn install_chunk(
191191
chunk_hash: &String,
192192
store_path: &Path,
193193
repo_cache_path: &Path,
194194
) -> Result<(), String> {
195+
use crate::compression::decompress_file;
196+
195197
let repo_chunk_path = repo_cache_path.join("chunks").join(chunk_hash);
196198
let store_chunk_path = store_path.join("chunks").join(chunk_hash);
197199

0 commit comments

Comments
 (0)