From 2cd66b58a7534861e3fd343ed931d39f2ddc2017 Mon Sep 17 00:00:00 2001 From: nickelc Date: Fri, 3 Mar 2023 11:26:18 +0100 Subject: Update `git2` to 0.16.1 (#1323) --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- src/options/get.rs | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f4112665..f926d3ae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -622,9 +622,9 @@ dependencies = [ [[package]] name = "git2" -version = "0.14.2" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3826a6e0e2215d7a41c2bfc7c9244123969273f3476b939a226aac0ab56e9e3c" +checksum = "ccf7f68c2995f392c49fffb4f95ae2c873297830eb25c6bc4c114ce8f4562acc" dependencies = [ "bitflags", "libc", @@ -746,9 +746,9 @@ checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libgit2-sys" -version = "0.13.2+1.4.2" +version = "0.14.2+1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a42de9a51a5c12e00fc0e4ca6bc2ea43582fc6418488e8f615e905d886f258b" +checksum = "7f3d95f6b51075fe9810a7ae22c7095f12b98005ab364d8544797a825ce946a4" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index 46fd969a..18f9e9c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ vte = "0.10.1" xdg = "2.4.1" [dependencies.git2] -version = "0.14.0" +version = "0.16.1" default-features = false features = [] diff --git a/src/options/get.rs b/src/options/get.rs index 3258a103..53a4d635 100644 --- a/src/options/get.rs +++ b/src/options/get.rs @@ -46,7 +46,9 @@ lazy_static! { pub fn get_themes(git_config: Option) -> Vec { let mut themes: Vec = Vec::new(); - for e in &git_config.unwrap().config.entries(None).unwrap() { + let git_config = git_config.unwrap(); + let mut entries = git_config.config.entries(None).unwrap(); + while let Some(e) = entries.next() { let entry = e.unwrap(); let entry_name = entry.name().unwrap(); let caps = GIT_CONFIG_THEME_REGEX.captures(entry_name); -- cgit v1.2.3