From c3cc3de818e69a36bca0f1611a85f67c99106c3f Mon Sep 17 00:00:00 2001 From: demize Date: Mon, 10 Mar 2025 00:56:32 -0400 Subject: [PATCH] git: clean up remove_remote_git_config_sections --- lib/src/git.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/src/git.rs b/lib/src/git.rs index 12d33ca78..16ef384e2 100644 --- a/lib/src/git.rs +++ b/lib/src/git.rs @@ -1473,7 +1473,7 @@ fn remove_remote_git_config_sections( config: &mut gix::config::File, remote_name: &str, ) -> Result<(), GitRemoteManagementError> { - let section_ids_to_remove = config + let section_ids_to_remove: Vec<_> = config .sections_by_name("remote") .into_iter() .flatten() @@ -1488,8 +1488,7 @@ fn remove_remote_git_config_sections( } Ok(section.id()) }) - .collect::, _>>()? - .into_iter(); + .try_collect()?; for id in section_ids_to_remove { config .remove_section_by_id(id)