Skip to content

Commit 1e0d33e

Browse files
committed
refactor(source): Flatten RecursivePathSource::read_packages_inner
1 parent 05e9442 commit 1e0d33e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/cargo/sources/path.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,6 @@ impl<'gctx> RecursivePathSource<'gctx> {
256256
Ok(self.packages.clone())
257257
}
258258

259-
fn read_packages_inner(&self) -> CargoResult<Vec<Package>> {
260-
read_packages(&self.path, self.source_id, self.gctx)
261-
}
262-
263259
/// List all files relevant to building this package inside this source.
264260
///
265261
/// This function will use the appropriate methods to determine the
@@ -293,7 +289,7 @@ impl<'gctx> RecursivePathSource<'gctx> {
293289
/// Discovers packages inside this source if it hasn't yet done.
294290
pub fn load(&mut self) -> CargoResult<()> {
295291
if !self.loaded {
296-
self.packages = self.read_packages_inner()?;
292+
self.packages = read_packages(&self.path, self.source_id, self.gctx)?;
297293
self.loaded = true;
298294
}
299295

0 commit comments

Comments
 (0)