We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78dcb42 commit 09b55bcCopy full SHA for 09b55bc
src/index/mod.rs
@@ -41,6 +41,8 @@ fn load_config(repo: &git2::Repository) -> Result<IndexConfig> {
41
impl Index {
42
pub(crate) fn new(path: impl AsRef<Path>) -> Result<Self> {
43
let path = path.as_ref().to_owned();
44
+ // This initializes the repository, then closes it afterwards to avoid leaking file descriptors.
45
+ // See https://github.com/rust-lang/docs.rs/pull/847
46
let diff = crates_index_diff::Index::from_path_or_cloned(&path)
47
.context("initialising registry index repository")?;
48
let config = load_config(diff.repository()).context("loading registry config")?;
0 commit comments