Skip to content

Commit e41b83a

Browse files
author
David Ungar
committed
Nits fixed
1 parent 0953d7b commit e41b83a

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraph.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@ extension ModuleDependencyGraph {
449449
options: IncrementalCompilationState.Options
450450
) throws -> ModuleDependencyGraph? {
451451
guard try fileSystem.exists(path) else {
452-
return nil
453-
}
452+
return nil
453+
}
454454
let data = try fileSystem.readFileContents(path)
455455

456456
struct Visitor: BitstreamVisitor {
@@ -935,7 +935,7 @@ extension ModuleDependencyGraph {
935935
$0.append(RecordID.mapNode)
936936
$0.append(serializer.lookupIdentifierCode(for: input.file.name))
937937
$0.append(serializer.lookupIdentifierCode(for: dependencySource.file.name))
938-
}
938+
}
939939
}
940940

941941
for fingerprintedExternalDependency in graph.fingerprintedExternalDependencies {

Tests/SwiftDriverTests/DependencyGraphSerializationTests.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ class DependencyGraphSerializationTests: XCTestCase {
2121
let fs = InMemoryFileSystem()
2222
graph.write(to: mockPath, on: fs, compilerVersion: "Swift 99")
2323

24-
let deserializedGraph = try ModuleDependencyGraph.read(from: mockPath,
25-
on: fs,
26-
diagnosticEngine: de,
27-
reporter: nil,
28-
options: [])!
24+
let deserializedGraph = try XCTUnwrap(
25+
try ModuleDependencyGraph.read(from: mockPath,
26+
on: fs,
27+
diagnosticEngine: de,
28+
reporter: nil,
29+
options: []))
2930
var originalNodes = Set<ModuleDependencyGraph.Node>()
3031
graph.nodeFinder.forEachNode {
3132
originalNodes.insert($0)

0 commit comments

Comments
 (0)