File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ pub struct Package {
24
24
25
25
impl Package {
26
26
/// Load a package from a given path.
27
- pub fn load ( package_path : & std:: path:: Path ) -> anyhow:: Result < Option < Self > > {
27
+ pub fn load_from_folder ( package_path : & std:: path:: Path ) -> anyhow:: Result < Option < Self > > {
28
28
let description_path = package_path. join ( "DESCRIPTION" ) ;
29
29
let namespace_path = package_path. join ( "NAMESPACE" ) ;
30
30
@@ -65,7 +65,7 @@ impl Package {
65
65
66
66
// For library packages, ensure the invariant that the package name
67
67
// matches the folder name
68
- if let Some ( pkg) = Self :: load ( & package_path) ? {
68
+ if let Some ( pkg) = Self :: load_from_folder ( & package_path) ? {
69
69
if pkg. description . name != name {
70
70
return Err ( anyhow:: anyhow!(
71
71
"`Package` field in `DESCRIPTION` doesn't match folder name '{name}'"
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ pub(crate) fn initialize(
87
87
// root if found. This means we're dealing with a package
88
88
// source.
89
89
if state. root . is_none ( ) {
90
- match Package :: load ( & path) {
90
+ match Package :: load_from_folder ( & path) {
91
91
Ok ( Some ( pkg) ) => {
92
92
log:: info!(
93
93
"Root: Loaded package `{pkg}` from {path} as project root" ,
You can’t perform that action at this time.
0 commit comments