File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -71,14 +71,14 @@ public struct Path: Serializable, Sendable {
7171 public static let pathSeparator = Character ( " \\ " )
7272 @inline ( __always) public static var pathSeparatorUTF8 : UInt8 { UInt8 ( ascii: " \\ " ) }
7373 public static let pathEnvironmentSeparator = Character ( " ; " )
74- @inline ( __always) public static func isUTF8PathSeparator( _ char: UInt8 ) -> Bool {
74+ @inline ( __always) public static func isUTF8PathSeparator( _ char: UInt8 , separators : ( some Collection < Character > ) ? = ( [ Character ] ? ) . none ) -> Bool {
7575 guard let separators else {
7676 return char == pathSeparatorUTF8 || char == UInt8 ( ascii: " / " )
7777 }
7878 // This is a bit inefficient, but separators should always be nil outside of tests
7979 return separators. contains ( String ( decoding: CollectionOfOne ( char) , as: UTF8 . self) )
8080 }
81- public static func firstPathSeparatorIndex( in str: some StringProtocol , separators: ( some Collection < Character > ) ? ) -> String . Index ? {
81+ @ inline ( __always ) public static func firstPathSeparatorIndex( in str: some StringProtocol , separators: ( some Collection < Character > ) ? ) -> String . Index ? {
8282 guard let separators else {
8383 return str. utf8. firstIndex ( where: Path . isUTF8PathSeparator)
8484 }
You can’t perform that action at this time.
0 commit comments