);
}
- if let Some(file) = files.iter_mut().find(|file| file.path.as_ref() == Some(&path)) {
+ if let Some(file) = files
+ .iter_mut()
+ .find(|file| file.path.as_ref() == Some(&path))
+ {
file.repositories.push(repo);
file.write()?;
bail!("unable to parse file {} - {}", error.path, error.error);
}
- if let Some(file) = files.iter_mut().find(|file| file.path.as_ref() == Some(&path)) {
+ if let Some(file) = files
+ .iter_mut()
+ .find(|file| file.path.as_ref() == Some(&path))
+ {
if let Some(repo) = file.repositories.get_mut(index) {
if let Some(enabled) = enabled {
repo.set_enabled(enabled);