Skip to content

Commit 7238f89

Browse files
Minor compile-time optimization
1 parent 6885060 commit 7238f89

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Plugins/PackageToJS/Sources/MiniMake.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ struct MiniMake {
109109
mutating func addTask(
110110
inputFiles: [BuildPath] = [], inputTasks: [TaskKey] = [], output: BuildPath,
111111
attributes: [TaskAttribute] = [], salt: (any Encodable)? = nil,
112-
build: @escaping (_ task: Task, _ scope: VariableScope) throws -> Void
112+
build: @escaping (_ task: Task, _ scope: VariableScope) throws -> Void = { _, _ in }
113113
) -> TaskKey {
114114
let taskKey = TaskKey(id: output.description)
115115
let saltData = try! salt.map {

Plugins/PackageToJS/Sources/PackageToJS.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ struct PackagingPlanner {
394394
)
395395
return make.addTask(
396396
inputTasks: allTasks, output: BuildPath(phony: "all"), attributes: [.phony, .silent]
397-
) { _, _ in }
397+
)
398398
}
399399

400400
private func planBuildInternal(
@@ -560,7 +560,7 @@ struct PackagingPlanner {
560560
}
561561
let rootTask = make.addTask(
562562
inputTasks: allTasks, output: BuildPath(phony: "all"), attributes: [.phony, .silent]
563-
) { _, _ in }
563+
)
564564
return (rootTask, binDir)
565565
}
566566

0 commit comments

Comments
 (0)