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 8519ad2 commit 7128c76Copy full SHA for 7128c76
src/cargo/sources/path.rs
@@ -244,12 +244,9 @@ impl<'gctx> RecursivePathSource<'gctx> {
244
245
/// Returns the packages discovered by this source. It may walk the
246
/// filesystem if package information haven't yet loaded.
247
- pub fn read_packages(&self) -> CargoResult<Vec<Package>> {
248
- if self.loaded {
249
- Ok(self.packages.clone())
250
- } else {
251
- self.read_packages_inner()
252
- }
+ pub fn read_packages(&mut self) -> CargoResult<Vec<Package>> {
+ self.load()?;
+ Ok(self.packages.clone())
253
}
254
255
fn read_packages_inner(&self) -> CargoResult<Vec<Package>> {
0 commit comments