summaryrefslogtreecommitdiffstats
path: root/src/source
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-11-11 14:38:34 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-11-11 17:05:26 +0100
commitf05ebcf1d2066c3499a4ac64d47265bf4b695c5c (patch)
tree93280524ccb0dd50a8a5eb83687a77ee98ebc5a9 /src/source
parentdbcd101be62a4bc6bfbdad0b1f82de3020a43643 (diff)
Add SourceEntry::url()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/source')
-rw-r--r--src/source/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/source/mod.rs b/src/source/mod.rs
index e88fd60..90e69d8 100644
--- a/src/source/mod.rs
+++ b/src/source/mod.rs
@@ -2,6 +2,7 @@ use std::path::PathBuf;
use anyhow::Result;
use anyhow::Error;
+use url::Url;
use crate::package::Package;
use crate::package::PackageName;
@@ -52,6 +53,10 @@ impl SourceEntry {
&self.package_source_path
}
+ pub fn url(&self) -> &Url {
+ self.package_source.url()
+ }
+
pub async fn verify_hash(&self) -> Result<bool> {
use tokio::io::AsyncReadExt;