diff --git a/Sources/TextTable/TextTable.swift b/Sources/TextTable/TextTable.swift index 0c18b1a..68c9ed9 100644 --- a/Sources/TextTable/TextTable.swift +++ b/Sources/TextTable/TextTable.swift @@ -271,7 +271,8 @@ public struct TextTable { - parameter style: The style of table to be rendered. See `Style` for more options. */ public func print(_ data: C, style: TextTableStyle.Type = Style.simple) where C.Iterator.Element == T { - let table = string(for: data, style: style)! - Swift.print(table) + if let table = string(for: data, style: style) { + Swift.print(table) + } } }