summaryrefslogtreecommitdiffstats
path: root/src/pkgver/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkgver/mod.rs')
-rw-r--r--src/pkgver/mod.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/pkgver/mod.rs b/src/pkgver/mod.rs
index 450d70f..ef00b55 100644
--- a/src/pkgver/mod.rs
+++ b/src/pkgver/mod.rs
@@ -39,10 +39,10 @@ impl Version {
let (epoch, pkgver, pkgrel) = split_full_version(v);
Self { epoch, pkgver, pkgrel }
}
- pub fn cmp_full(&self, other: &Version) -> Ordering {
+ fn cmp_full(&self, other: &Version) -> Ordering {
compare(self.epoch_as_i64(), &self.pkgver, &self.pkgrel, other.epoch_as_i64(), &other.pkgver, &other.pkgrel)
}
- pub fn epoch_as_i64(&self) -> i64 {
+ fn epoch_as_i64(&self) -> i64 {
self.epoch.trim().parse().unwrap_or(0)
}
pub fn display(&self) -> String {
@@ -187,10 +187,6 @@ pub fn is_downgrade(current: &str, new: &str) -> bool {
vercmp(current, new) == Ordering::Greater
}
-pub fn same_version(current: &str, new: &str) -> bool {
- vercmp(current, new) == Ordering::Equal
-}
-
// ------------------------------------------------------------- dep strings --
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -280,7 +276,7 @@ impl fmt::Display for Dep {
}
}
-pub fn parse_deps(list: &[String]) -> Vec<Dep> {
+fn parse_deps(list: &[String]) -> Vec<Dep> {
list.iter().filter_map(|s| Dep::parse(s)).collect()
}