Skip to content

Commit 671db08

Browse files
committed
PR feedback: use precondition in place of assert
1 parent 3b0e5bb commit 671db08

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tools/swift-inspect/Sources/SwiftInspectLinux/MemoryMap.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public class MemoryMap {
6666
} else if entry.endAddr <= addr {
6767
lowerBound = currentIndex + 1
6868
} else {
69-
assert(addr >= entry.startAddr)
70-
assert(addr < entry.endAddr)
69+
precondition(addr >= entry.startAddr)
70+
precondition(addr < entry.endAddr)
7171
return entry
7272
}
7373
}

tools/swift-inspect/Sources/SwiftInspectLinux/SymbolCache.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public class SymbolCache {
6464
} else if entry.end <= address {
6565
lowerBound = currentIndex + 1
6666
} else {
67-
assert(address >= entry.start)
68-
assert(address < entry.end)
67+
precondition(address >= entry.start)
68+
precondition(address < entry.end)
6969
return entry
7070
}
7171
}

0 commit comments

Comments
 (0)