Avoid unneeded clone.

This commit is contained in:
R-VdP 2023-02-17 13:22:38 +01:00
parent d428df9c72
commit f861aa6d2a
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View file

@ -11,8 +11,8 @@ pub fn activate(store_path: StorePath, ephemeral: bool) -> Result<()> {
log::info!("Running in ephemeral mode");
}
etc_files::activate(store_path.clone(), ephemeral)?;
services::activate(store_path, ephemeral)?;
etc_files::activate(&store_path, ephemeral)?;
services::activate(&store_path, ephemeral)?;
Ok(())
}

View file

@ -29,7 +29,7 @@ struct EtcFilesConfig {
static_env: StorePath,
}
pub fn activate(store_path: StorePath, ephemeral: bool) -> Result<()> {
pub fn activate(store_path: &StorePath, ephemeral: bool) -> Result<()> {
log::info!("Reading etc file definitions...");
let file = fs::File::open(Path::new(&store_path.store_path).join("etcFiles/etcFiles.json"))?;
let reader = io::BufReader::new(file);

View file

@ -43,7 +43,7 @@ impl LinkedServiceConfig {
type LinkedServices = HashMap<String, LinkedServiceConfig>;
pub fn activate(store_path: StorePath, ephemeral: bool) -> Result<()> {
pub fn activate(store_path: &StorePath, ephemeral: bool) -> Result<()> {
let old_linked_services = read_linked_services()?;
log::debug!("{:?}", old_linked_services);