Skip to content

Commit

Permalink
Minor style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stevapple committed Jun 6, 2021
1 parent 76ae479 commit 3903c62
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/TSCBasic/Path.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public protocol Path: Hashable, Codable, CustomStringConvertible {
var components: [String] { get }
}

/// Default implementations of some protocol stubs.
extension Path {
public var pathString: String {
if filepath.string.isEmpty {
Expand Down Expand Up @@ -145,7 +146,10 @@ extension Path {
}
return components
}
}

/// Default implementation of `CustomStringConvertible`.
extension Path {
public var description: String {
return pathString
}
Expand All @@ -156,6 +160,7 @@ extension Path {
}
}

/// Default implementation of `Codable`.
extension Path {
public func encode(to encoder: Encoder) throws {
var container = encoder.singleValueContainer()
Expand Down

0 comments on commit 3903c62

Please sign in to comment.