Skip to content

Commit 089d9a1

Browse files
Apply suggestion from @jakepetroules
Co-authored-by: Jake Petroules <jake.petroules@apple.com>
1 parent d39e8a4 commit 089d9a1

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
@@ -80,7 +80,7 @@ public struct Path: Serializable, Sendable {
8080
}
8181
@inline(__always) public static func firstPathSeparatorIndex(in str: some StringProtocol, separators: (some Collection<Character>)?) -> String.Index? {
8282
guard let separators else {
83-
return str.utf8.firstIndex(where: Path.isUTF8PathSeparator)
83+
return str.utf8.firstIndex(where: { Path.isUTF8PathSeparator($0, separators) })
8484
}
8585
return str.firstIndex(where: { separators.contains($0) })
8686
}

0 commit comments

Comments
 (0)