mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[xcodegen] Clean up file extension handling
Factor out `FileExtension.matches` and add some tests.
This commit is contained in:
@@ -74,9 +74,3 @@ extension AnyPath: ExpressibleByArgument {
|
||||
self.init(rawPath)
|
||||
}
|
||||
}
|
||||
|
||||
extension StringProtocol {
|
||||
func hasExtension(_ ext: FileExtension) -> Bool {
|
||||
FilePath(String(self)).extension == ext.rawValue
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user