From af8df7c605be085ea587fa754dca0df6fd43a4fd Mon Sep 17 00:00:00 2001 From: David Peter Date: Sat, 29 Jan 2022 13:23:05 +0100 Subject: [PATCH] Update dependencies --- Cargo.lock | 85 +++++++++++++++++++++++++++++++++++++++++++----- Cargo.toml | 6 ++-- src/filetypes.rs | 2 +- src/main.rs | 2 +- 4 files changed, 82 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 57b7790..6a214ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,6 +37,15 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + [[package]] name = "cc" version = "1.0.72" @@ -65,11 +74,29 @@ dependencies = [ "vec_map", ] +[[package]] +name = "cpufeatures" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +dependencies = [ + "libc", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + [[package]] name = "dirs" -version = "3.0.2" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ "dirs-sys", ] @@ -85,6 +112,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "generic-array" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "getrandom" version = "0.2.4" @@ -123,6 +160,12 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + [[package]] name = "proc-macro2" version = "1.0.36" @@ -162,9 +205,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "5.9.0" +version = "6.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fe1fe6aac5d6bb9e1ffd81002340363272a7648234ec7bdfac5ee202cb65523" +checksum = "d40377bff8cceee81e28ddb73ac97f5c2856ce5522f0b260b763f434cdfae602" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -173,9 +216,9 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "5.9.0" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed91c41c42ef7bf687384439c312e75e0da9c149b0390889b94de3c7d9d9e66" +checksum = "94e763e24ba2bf0c72bc6be883f967f794a019fafd1b86ba1daff9c91a7edd30" dependencies = [ "proc-macro2", "quote", @@ -186,10 +229,11 @@ dependencies = [ [[package]] name = "rust-embed-utils" -version = "5.1.0" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a512219132473ab0a77b52077059f1c47ce4af7fbdc94503e9862a34422876d" +checksum = "ad22c7226e4829104deab21df575e995bfbc4adfad13a595e387477f238c1aec" dependencies = [ + "sha2", "walkdir", ] @@ -202,6 +246,19 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer", + "cfg-if", + "cpufeatures", + "digest", + "opaque-debug", +] + [[package]] name = "strsim" version = "0.8.0" @@ -239,6 +296,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "typenum" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" + [[package]] name = "unicode-width" version = "0.1.9" @@ -257,6 +320,12 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + [[package]] name = "vivid" version = "0.8.0" diff --git a/Cargo.toml b/Cargo.toml index 4f4ee5c..9b1629c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,10 +13,10 @@ edition = "2018" [dependencies] yaml-rust = "0.4" -lazy_static = "1.2.0" +lazy_static = "1.2" ansi_colours = "1.0" -dirs = "3.0.0" -rust-embed = "5.6.0" +dirs = "4.0" +rust-embed = "6.3" [dependencies.clap] version = "2" diff --git a/src/filetypes.rs b/src/filetypes.rs index 11c1bf7..8a90278 100644 --- a/src/filetypes.rs +++ b/src/filetypes.rs @@ -27,7 +27,7 @@ impl FileTypes { pub fn from_embedded() -> Result { let filetypes = ConfigAssets::get("filetypes.yml").unwrap(); - let contents = std::str::from_utf8(filetypes.as_ref()) + let contents = std::str::from_utf8(&filetypes.data) .map_err(|_| VividError::CouldNotLoadDatabaseFrom(String::from("embedded defaults")))?; Self::from_string(contents) } diff --git a/src/main.rs b/src/main.rs index 4f0f273..67a3216 100644 --- a/src/main.rs +++ b/src/main.rs @@ -123,7 +123,7 @@ fn load_theme( Some(path) => return Theme::from_path(path, color_mode), None => { if let Some(embedded_file) = ThemeAssets::get(&theme_file) { - if let Ok(embedded_data) = std::str::from_utf8(embedded_file.as_ref()) { + if let Ok(embedded_data) = std::str::from_utf8(&embedded_file.data) { return Theme::from_string(embedded_data, color_mode); } }