Skip to content

Commit c52a61c

Browse files
authored
Merge pull request #155 from mattt/bytestring-nonfatal-description
Remove fatalError from implementation of ByteString description
2 parents be605ed + 97a89c9 commit c52a61c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Sources/TSCBasic/ByteString.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,7 @@ public struct ByteString: ExpressibleByArrayLiteral, Hashable {
108108
extension ByteString: CustomStringConvertible {
109109
/// Return the string decoded as a UTF8 sequence, or traps if not possible.
110110
public var description: String {
111-
guard let description = validDescription else {
112-
fatalError("invalid byte string: \(cString)")
113-
}
114-
115-
return description
111+
return cString
116112
}
117113

118114
/// Return the string decoded as a UTF8 sequence, if possible.

0 commit comments

Comments
 (0)