File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Tests/PackageLoadingTests Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public extension String {
5454 }
5555
5656 // Otherwise iterate and escape all the single quotes.
57- var newString = " ' " + String( utf8 [ utf8. startIndex..< singleQuotePos] )
57+ var newString = " ' " + String( utf8 [ utf8. startIndex..< singleQuotePos] ) !
5858
5959 for char in utf8 [ singleQuotePos..< utf8. endIndex] {
6060 if char == UInt8 ( ascii: " ' " ) {
Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ private struct Lexer {
268268 break
269269 }
270270 }
271- return . stringLiteral( value: String ( utf8 [ utf8. index ( after: startIndex) ..< endIndex] ) )
271+ return . stringLiteral( value: String ( utf8 [ utf8. index ( after: startIndex) ..< endIndex] ) ! )
272272
273273 // Numeric literals.
274274 //
@@ -279,7 +279,7 @@ private struct Lexer {
279279 while let c = look ( ) , c. isNumberChar ( ) {
280280 let _ = eat ( )
281281 }
282- return . number( value: String ( utf8 [ startIndex..< index] ) )
282+ return . number( value: String ( utf8 [ startIndex..< index] ) ! )
283283
284284 // Identifiers.
285285 case let c where c. isIdentifierChar ( ) :
@@ -289,7 +289,7 @@ private struct Lexer {
289289 }
290290
291291 // Match special strings.
292- let value : String = String ( utf8 [ startIndex..< index] )
292+ let value : String = String ( utf8 [ startIndex..< index] ) !
293293 switch value {
294294 case " true " :
295295 return . boolean( value: true )
@@ -761,5 +761,5 @@ public extension TOMLItem {
761761/// returns: A list of the lexed tokens' string representations.
762762internal func lexTOML( _ data: String ) -> [ String ] {
763763 let lexer = Lexer ( data)
764- return lexer. map { String ( $0) }
764+ return lexer. map { String ( describing : $0) }
765765}
Original file line number Diff line number Diff line change @@ -835,7 +835,7 @@ final class PackageBuilderTester {
835835 // FIXME: Find a better way. Maybe Package can keep array of warnings.
836836 uncheckedDiagnostics = Set ( warningStream. bytes. asReadableString. characters. split ( separator: " \n " ) . map ( String . init) )
837837 } catch {
838- let errorStr = String ( error)
838+ let errorStr = String ( describing : error)
839839 result = . error( errorStr)
840840 uncheckedDiagnostics. insert ( errorStr)
841841 }
You can’t perform that action at this time.
0 commit comments