Skip to content

Commit

Permalink
Add preludeScope to TSApplicationGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
Fahad Zubair committed Feb 20, 2025
1 parent a10914e commit b105a8d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class TsApplicationGenerator(
"parking_lot" to TsServerCargoDependency.ParkingLot.toType(),
"http" to RuntimeType.Http,
"socket2" to TsServerCargoDependency.Socket2.toType(),
*RuntimeType.preludeScope
)

fun render(writer: RustWriter) {
Expand Down Expand Up @@ -213,7 +214,7 @@ class TsApplicationGenerator(
}
writer.rustBlockTemplate(
"""pub fn new_socket(address: String, port: i32, backlog: Option<i32>) -> #{Result}<#{socket2}::Socket, Box<dyn std::error::Error>> """.trimIndent(),
*codegenScope,
*codegenScope
) {
writer.rustTemplate(
"""
Expand Down

0 comments on commit b105a8d

Please sign in to comment.