File tree Expand file tree Collapse file tree 1 file changed +2
-19
lines changed Expand file tree Collapse file tree 1 file changed +2
-19
lines changed Original file line number Diff line number Diff line change 55#![ deny( rustdoc:: broken_intra_doc_links) ]
66#![ doc = include_str ! ( "../README.md" ) ]
77
8- use anyhow:: { bail , Context , Result } ;
8+ use anyhow:: Result ;
99use pbxproj:: PBXRootObject ;
1010use std:: path:: { Path , PathBuf } ;
1111
@@ -23,25 +23,8 @@ pub struct XCodeProject {
2323}
2424
2525impl XCodeProject {
26- /// Create new XCodeProject object from project root
27- pub fn new < P : AsRef < Path > > ( root : P ) -> Result < Self > {
28- let matches = wax:: walk ( "*.xcodeproj" , & root)
29- . context ( "Glob" ) ?
30- . flatten ( )
31- . map ( |entry| entry. into_path ( ) )
32- . collect :: < Vec < PathBuf > > ( ) ;
33-
34- let path = if matches. is_empty ( ) {
35- bail ! ( "No Xcodeproj found at {:#?}" , root. as_ref( ) ) ;
36- } else {
37- & matches[ 0 ]
38- } ;
39-
40- Self :: new_from_xcodeproj_folder ( path)
41- }
42-
4326 /// Create new XCodeProject object from xcodeproj_folder
44- pub fn new_from_xcodeproj_folder < P : AsRef < Path > > ( xcodeproj_folder : P ) -> Result < Self > {
27+ pub fn new < P : AsRef < Path > > ( xcodeproj_folder : P ) -> Result < Self > {
4528 let xcodeproj_folder = xcodeproj_folder. as_ref ( ) ;
4629 let pbxproj_path = xcodeproj_folder. join ( "project.pbxproj" ) ;
4730
You can’t perform that action at this time.
0 commit comments