File tree 4 files changed +7
-4
lines changed
4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ class DataCache {
76
76
func dataForKey( _ key: String ) -> Data ? {
77
77
var result : Data ?
78
78
privateQueue. addOperation {
79
- result = self . cache. object ( forKey: key as NSString ) as? Data
79
+ result = self . cache. object ( forKey: key as NSString ) as Data ?
80
80
if result == nil {
81
81
let targetURL = self . directoryURL. appendingPathComponent ( key)
82
82
result = try ? Data ( contentsOf: targetURL)
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ class Keychain {
60
60
if status == errSecSuccess {
61
61
if let retrievedData = dataTypeRef as? Data {
62
62
if retrievedData. count != 0 {
63
- accessToken = NSString ( data: retrievedData, encoding: String . Encoding. utf8. rawValue) as? String
63
+ accessToken = NSString ( data: retrievedData, encoding: String . Encoding. utf8. rawValue) as String ?
64
64
}
65
65
}
66
66
}
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ open class ConsoleLogger: Logger {
32
32
33
33
open func session( _ session: Session , didReceiveResult result: Result ) {
34
34
print ( " " )
35
- print ( " Session did receive response: \( result. HTTPSTatusCode) , \( result. URL) " )
35
+ print ( " Session did receive response: " + String( describing: result. HTTPSTatusCode) + " , "
36
+ + String( describing: result. URL) )
36
37
if let warning = result. response ? [ " warning " ] as? [ String : AnyObject ] {
37
38
if let text = warning [ " text " ] as? String {
38
39
print ( " Warning: \( text) " )
Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ open class Result: CustomStringConvertible {
71
71
}
72
72
73
73
open var description : String {
74
- return " Status code: \( HTTPSTatusCode) \n Response: \( response) \n Error: \( error) "
74
+ return " Status code: " + String( describing: HTTPSTatusCode)
75
+ + " \n Response: " + String( describing: response)
76
+ + " \n Error: " + String( describing: error)
75
77
}
76
78
77
79
}
You can’t perform that action at this time.
0 commit comments