1- use std:: cell:: RefCell ;
2-
31use crate :: cmd:: modulemap;
42use anyhow:: { anyhow, bail, Context , Result } ;
53use camino_fs:: Utf8PathBuf ;
@@ -14,8 +12,6 @@ pub struct Configuration {
1412 pub lib_type : LibType ,
1513 // Name of the library (used for the compiled artifacts)
1614 pub lib_name : String ,
17- /// Name of the module, as defined in the modulemap. Used for naming the XCframework
18- module_name : RefCell < Option < String > > ,
1915 /// Directory for all generated artifacts
2016 pub target_dir : Utf8PathBuf ,
2117 /// Directory where the xcframework will be built
@@ -60,7 +56,6 @@ impl Configuration {
6056 cli,
6157 lib_type,
6258 lib_name : target. name . clone ( ) ,
63- module_name : RefCell :: new ( None ) ,
6459 target_dir,
6560 build_dir,
6661 } )
@@ -99,14 +94,7 @@ impl Configuration {
9994 }
10095
10196 pub fn module_name ( & self ) -> Result < String > {
102- let name = self . module_name . borrow ( ) . clone ( ) ;
103- if let Some ( name) = name {
104- Ok ( name)
105- } else {
106- let name = modulemap:: get_module_name ( self ) ?;
107- * self . module_name . borrow_mut ( ) = Some ( name. clone ( ) ) ;
108- Ok ( name)
109- }
97+ modulemap:: get_module_name ( self )
11098 }
11199
112100 pub fn profile ( & self ) -> & str {
0 commit comments