Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/lib.rs')
-rw-r--r--helix-term/src/lib.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/helix-term/src/lib.rs b/helix-term/src/lib.rs
index cf4fbd9f..71fb3b4f 100644
--- a/helix-term/src/lib.rs
+++ b/helix-term/src/lib.rs
@@ -18,7 +18,6 @@ use futures_util::Future;
mod handlers;
use ignore::DirEntry;
-use url::Url;
#[cfg(windows)]
fn true_color() -> bool {
@@ -70,10 +69,10 @@ fn filter_picker_entry(entry: &DirEntry, root: &Path, dedup_symlinks: bool) -> b
}
/// Opens URL in external program.
-fn open_external_url_callback(
- url: Url,
+fn open_external_url_callback<U: AsRef<std::ffi::OsStr>>(
+ url: U,
) -> impl Future<Output = Result<job::Callback, anyhow::Error>> + Send + 'static {
- let commands = open::commands(url.as_str());
+ let commands = open::commands(url);
async {
for cmd in commands {
let mut command = tokio::process::Command::new(cmd.get_program());