summaryrefslogtreecommitdiffstats
path: root/src/urlutil.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/urlutil.rs')
-rw-r--r--src/urlutil.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/urlutil.rs b/src/urlutil.rs
index 75b52b9..51def16 100644
--- a/src/urlutil.rs
+++ b/src/urlutil.rs
@@ -1,17 +1,10 @@
-//! Source-URL questions that more than one module asks (§6 m-2).
-//!
-//! `review::diff` and `review::risk` each carried a verbatim copy of `hosts`,
-//! which is the kind of duplication that stays harmless until one copy is fixed
-//! and the other is not: the diff panel would tell a reviewer a host appeared
-//! while the risk scorer stayed quiet about the same host.
-
use std::collections::BTreeSet;
/// The host of one `source=()` entry, or `None` when it names no host — a local
/// file, a relative path, or a `file://` URL.
///
-/// Handles the two prefixes a PKGBUILD puts in front of a URL: a `custom::`
-/// filename prefix, and the `git+`/`svn+`/`npm+` VCS scheme prefix.
+/// Handles the `custom::` and `git+`/`svn+`/`npm+` prefixes a PKGBUILD puts before a
+/// URL.
pub fn host_of(source: &str) -> Option<String> {
let s = source.rsplit("::").next().unwrap_or(source);
let s = s.rsplit('+').next().unwrap_or(s);