Skip to content

Commit 667b992

Browse files
committed
Avoid using IUO
1 parent 388faab commit 667b992

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Sources/Xcodeproj/generate().swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,10 @@ public func generate(
7272
let extraDirs = try findDirectoryReferences(path: srcroot)
7373

7474
/// Generate the contents of project.xcodeproj (inside the .xcodeproj).
75-
var project: Xcode.Project!
75+
// FIXME: This could be more efficient by directly writing to a stream
76+
// instead of first creating a string.
77+
let project = try pbxproj(xcodeprojPath: xcodeprojPath, graph: graph, extraDirs: extraDirs, options: options)
7678
try open(xcodeprojPath.appending(component: "project.pbxproj")) { stream in
77-
// FIXME: This could be more efficient by directly writing to a stream
78-
// instead of first creating a string.
79-
project = try pbxproj(xcodeprojPath: xcodeprojPath, graph: graph, extraDirs: extraDirs, options: options)
80-
8179
// Serialize the project model we created to a plist, and return
8280
// its string description.
8381
let str = "// !$*UTF8*$!\n" + project.generatePlist().description

0 commit comments

Comments
 (0)