Skip to content

Commit 0f6d00d

Browse files
committed
Change use of deprecated index(of:) to firstIndex(of:) to fix build warning.
rdar://164578995
1 parent 756579b commit 0f6d00d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SWBUtil/Path.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public struct Path: Serializable, Sendable {
9797
}
9898
@inline(__always) public static func firstPathSeparatorIndex(in str: some StringProtocol, separators: (some Collection<Character>)?) -> String.Index? {
9999
guard let separators else {
100-
return str.utf8.index(of: pathSeparatorUTF8)
100+
return str.utf8.firstIndex(of: pathSeparatorUTF8)
101101
}
102102
return str.firstIndex(where: { separators.contains($0) })
103103
}

0 commit comments

Comments
 (0)