Skip to content

Commit 97a89c9

Browse files
committed
Use cString for ByteString description
Remove fatalError from implementation of ByteString description
1 parent b849bfa commit 97a89c9

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)