diff options
Diffstat (limited to 'crates/shirabe/src/downloader/path_downloader.rs')
| -rw-r--r-- | crates/shirabe/src/downloader/path_downloader.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/crates/shirabe/src/downloader/path_downloader.rs b/crates/shirabe/src/downloader/path_downloader.rs index c50856e..3eb2a48 100644 --- a/crates/shirabe/src/downloader/path_downloader.rs +++ b/crates/shirabe/src/downloader/path_downloader.rs @@ -14,6 +14,7 @@ use crate::cache::Cache; use crate::config::Config; use crate::dependency_resolver::operation::InstallOperation; use crate::dependency_resolver::operation::UninstallOperation; +use crate::downloader::ChangeReportInterface; use crate::downloader::DownloaderInterface; use crate::downloader::FileDownloader; use crate::downloader::VcsCapableDownloaderInterface; @@ -534,6 +535,16 @@ impl VcsCapableDownloaderInterface for PathDownloader { } } +impl crate::downloader::ChangeReportInterface for PathDownloader { + fn get_local_changes( + &self, + package: PackageInterfaceHandle, + path: &str, + ) -> anyhow::Result<Option<String>> { + self.inner.get_local_changes(package, path) + } +} + // TODO(phase-b): wire up PathDownloader trait properly. PathDownloader extends FileDownloader and // overrides download/install/remove with &mut self signatures that diverge from the trait. The // trait methods here delegate to the inner FileDownloader; the bespoke overrides on the struct @@ -544,6 +555,16 @@ impl DownloaderInterface for PathDownloader { self.inner.get_installation_source() } + fn as_change_report_interface(&self) -> Option<&dyn crate::downloader::ChangeReportInterface> { + Some(self) + } + + fn as_vcs_capable_downloader_interface( + &self, + ) -> Option<&dyn crate::downloader::VcsCapableDownloaderInterface> { + Some(self) + } + async fn download( &self, package: PackageInterfaceHandle, |
