From 09a43512e4a1525ef09a18832d9774c0572f6336 Mon Sep 17 00:00:00 2001 From: Brian Bowman Date: Sat, 12 Jun 2021 23:43:29 -0500 Subject: [PATCH] Update `opener` crate Fixes #2206, #2642 --- Cargo.lock | 22 ++++++++++++++++++++-- Cargo.toml | 2 +- src/utils/utils.rs | 2 +- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 60cd1a8af4..f74a7b81b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -168,6 +168,17 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "bstr" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d" +dependencies = [ + "lazy_static", + "memchr", + "regex-automata", +] + [[package]] name = "buf_redux" version = "0.8.4" @@ -1206,10 +1217,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "opener" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13117407ca9d0caf3a0e74f97b490a7e64c0ae3aa90a8b7085544d0c37b6f3ae" +checksum = "4ea3ebcd72a54701f56345f16785a6d3ac2df7e986d273eb4395c0b01db17952" dependencies = [ + "bstr", "winapi", ] @@ -1542,6 +1554,12 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" + [[package]] name = "regex-syntax" version = "0.6.23" diff --git a/Cargo.toml b/Cargo.toml index dd4adb968d..8e674403d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,7 @@ home = {git = "https://github.com/rbtcollins/home", rev = "a243ee2fbee6022c57d56 lazy_static = "1" libc = "0.2" num_cpus = "1.13" -opener = "0.4.0" +opener = "0.5.0" # Used by `curl` or `reqwest` backend although it isn't imported # by our rustup. openssl = {version = "0.10", optional = true} diff --git a/src/utils/utils.rs b/src/utils/utils.rs index 6307611674..e788afa72b 100644 --- a/src/utils/utils.rs +++ b/src/utils/utils.rs @@ -416,7 +416,7 @@ pub fn read_dir(name: &'static str, path: &Path) -> Result { } pub fn open_browser(path: &Path) -> Result<()> { - opener::open(path).context("couldn't open browser") + opener::open_browser(path).context("couldn't open browser") } pub fn set_permissions(path: &Path, perms: fs::Permissions) -> Result<()> {