mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-11 10:22:51 +00:00
git: clean up remove_remote_git_config_sections
This commit is contained in:
parent
cf696ce1b6
commit
c3cc3de818
@ -1473,7 +1473,7 @@ fn remove_remote_git_config_sections(
|
|||||||
config: &mut gix::config::File,
|
config: &mut gix::config::File,
|
||||||
remote_name: &str,
|
remote_name: &str,
|
||||||
) -> Result<(), GitRemoteManagementError> {
|
) -> Result<(), GitRemoteManagementError> {
|
||||||
let section_ids_to_remove = config
|
let section_ids_to_remove: Vec<_> = config
|
||||||
.sections_by_name("remote")
|
.sections_by_name("remote")
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.flatten()
|
.flatten()
|
||||||
@ -1488,8 +1488,7 @@ fn remove_remote_git_config_sections(
|
|||||||
}
|
}
|
||||||
Ok(section.id())
|
Ok(section.id())
|
||||||
})
|
})
|
||||||
.collect::<Result<Vec<_>, _>>()?
|
.try_collect()?;
|
||||||
.into_iter();
|
|
||||||
for id in section_ids_to_remove {
|
for id in section_ids_to_remove {
|
||||||
config
|
config
|
||||||
.remove_section_by_id(id)
|
.remove_section_by_id(id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user