File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -498,17 +498,11 @@ private class SQLiteDecoder: Decoder {
498498 func decodeIfPresent< T> ( _ type: T . Type , forKey key: Key ) throws -> T ? where T: Swift . Decodable {
499499 switch type {
500500 case is Data . Type :
501- if let data = try ? row. get ( Expression < Data > ( key. stringValue) ) {
502- return data as? T
503- }
501+ return try ? row. get ( Expression < Data > ( key. stringValue) ) as? T
504502 case is Date . Type :
505- if let date = try ? row. get ( Expression < Date > ( key. stringValue) ) {
506- return date as? T
507- }
503+ return try ? row. get ( Expression < Date > ( key. stringValue) ) as? T
508504 case is UUID . Type :
509- if let uuid = try ? row. get ( Expression < UUID > ( key. stringValue) ) {
510- return uuid as? T
511- }
505+ return try ? row. get ( Expression < UUID > ( key. stringValue) ) as? T
512506 default :
513507 guard let JSONString = try ? row. get ( Expression < String ? > ( key. stringValue) ) else {
514508 throw DecodingError . typeMismatch ( type, DecodingError . Context ( codingPath: codingPath,
@@ -520,8 +514,6 @@ private class SQLiteDecoder: Decoder {
520514 }
521515 return try JSONDecoder ( ) . decode ( type, from: data)
522516 }
523-
524- return nil
525517 }
526518
527519 func nestedContainer< NestedKey> ( keyedBy type: NestedKey . Type , forKey key: Key ) throws
You can’t perform that action at this time.
0 commit comments