File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,9 @@ export abstract class BaseTypeGenerator<Type extends RustType> {
43
43
* @param type
44
44
*/
45
45
generate ( type : Type ) {
46
- const fileContents = this . generateFileContents ( type ) ;
46
+ const fileName = this . swiftTypeName ( type ) + '.swift' ;
47
+ const fileContents = this . generateFileContents ( type )
48
+ . replaceAll ( '#{swift_class_name}' , fileName ) ;
47
49
this . persist ( type , fileContents ) ;
48
50
}
49
51
@@ -875,7 +877,7 @@ export abstract class BaseTypeGenerator<Type extends RustType> {
875
877
*/
876
878
const hasRecursiveOwnershipFlags = this . isRecursivelyPerpetuallySafelyFreeable ( returnType . type ) ;
877
879
878
- const instantiationContextInfixTemplate = ', instantiationContext: "#{swift_class_name}::\\(#function):\\(#line)"'
880
+ const instantiationContextInfixTemplate = ', instantiationContext: "#{swift_class_name}::\\(#function):\\(#line)"' ;
879
881
880
882
/**
881
883
* The returned object cannot live on its own. It needs the container to stick around.
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ export default class BindingsFileGenerator extends BaseTypeGenerator<GlobalBindi
23
23
// this call is the sole reason we need this inheritance
24
24
const swiftMethodName = this . swiftMethodName ( currentMethod . method ) ;
25
25
const methodCode = this . generateMethod ( currentMethod . method ) ;
26
- const renamedMethodCode = methodCode . replace ( swiftMethodName , currentMethod . swiftName ) ;
26
+ const renamedMethodCode = methodCode
27
+ . replace ( swiftMethodName , currentMethod . swiftName ) ;
27
28
generatedMethods += Generator . reindentCode ( renamedMethodCode , 4 ) ;
28
29
}
29
30
You can’t perform that action at this time.
0 commit comments