From 6b541a3e96c2f037e3119edca391764c9b601235 Mon Sep 17 00:00:00 2001 From: Denis Cornehl Date: Fri, 16 Jan 2026 02:09:34 +0100 Subject: [PATCH] Make `Crate::copy_source_to` public --- CHANGELOG.md | 2 ++ src/crates/mod.rs | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3966fb..35f51c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +* make `Crate::copy_source_to` public. + ## [0.22.0] - 2026-04-01 * **BREAKING**: replace lazy_static with LazyLock, add MSRV to what is in the code diff --git a/src/crates/mod.rs b/src/crates/mod.rs index b2f8d93..7ad00b9 100644 --- a/src/crates/mod.rs +++ b/src/crates/mod.rs @@ -74,7 +74,10 @@ impl Crate { } } - pub(crate) fn copy_source_to(&self, workspace: &Workspace, dest: &Path) -> anyhow::Result<()> { + /// copy the source of this crate to the specified destination path. + /// + /// Will delete the target directory if it already exists. + pub fn copy_source_to(&self, workspace: &Workspace, dest: &Path) -> anyhow::Result<()> { if dest.exists() { info!( "crate source directory {} already exists, cleaning it up",