diff options
-rw-r--r-- | src/commands/build.rs | 2 | ||||
-rw-r--r-- | src/commands/source.rs | 5 | ||||
-rw-r--r-- | src/config/not_validated.rs | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/commands/build.rs b/src/commands/build.rs index 757a9d3..33a04f8 100644 --- a/src/commands/build.rs +++ b/src/commands/build.rs @@ -165,7 +165,7 @@ pub async fn build(matches: &ArgMatches, tree }; - let source_cache = SourceCache::new(PathBuf::from(config.source_cache_root())); + let source_cache = SourceCache::new(config.source_cache_root().clone()); if matches.is_present("no_verification") { warn!("No hash verification will be performed"); diff --git a/src/commands/source.rs b/src/commands/source.rs index 343581e..9c72754 100644 --- a/src/commands/source.rs +++ b/src/commands/source.rs @@ -29,8 +29,7 @@ pub async fn source(matches: &ArgMatches, config: &Configuration, repo: Reposito } pub async fn verify(matches: &ArgMatches, config: &Configuration, repo: Repository) -> Result<()> { - let source_cache_root = PathBuf::from(config.source_cache_root()); - let sc = SourceCache::new(source_cache_root); + let sc = SourceCache::new(config.source_cache_root().clone()); let pname = matches.value_of("package_name").map(String::from).map(PackageName::from); let pvers = matches.value_of("package_version").map(String::from).map(PackageVersionConstraint::new).transpose()?; @@ -74,7 +73,7 @@ pub (in crate::commands) async fn verify_impl<'a, I>(packages: I, sc: &SourceCac } pub async fn list_missing(_: &ArgMatches, config: &Configuration, repo: Repository) -> Result<()> { - let sc = SourceCache::new(PathBuf::from(config.source_cache_root())); + let sc = SourceCache::new(config.source_cache_root().clone()); let out = std::io::stdout(); let mut outlock = out.lock(); diff --git a/src/config/not_validated.rs b/src/config/not_validated.rs index 6cf7148..5873410 100644 --- a/src/config/not_validated.rs +++ b/src/config/not_validated.rs @@ -40,7 +40,7 @@ pub struct NotValidatedConfiguration { #[serde(rename = "source_cache")] #[getset(get = "pub")] - source_cache_root: String, + source_cache_root: PathBuf, #[getset(get = "pub")] #[serde(rename = "database_host")] |