Przeglądaj źródła

updated for new error handling

not using try? will cause a compile error.  Updated readme to match the new error handling changes.
abunur 10 lat temu
rodzic
commit
0bb7168d80
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      README.md

+ 1 - 1
README.md

@@ -94,7 +94,7 @@ keychain.set("01234567-89ab-cdef-0123-456789abcdef", key: "kishikawakatsumi")
 #### error handling
 #### error handling
 
 
 ```swift
 ```swift
-if let error = keychain.set("01234567-89ab-cdef-0123-456789abcdef", key: "kishikawakatsumi") {
+if let error = try? keychain.set("01234567-89ab-cdef-0123-456789abcdef", key: "kishikawakatsumi") {
     print("error: \(error)")
     print("error: \(error)")
 }
 }
 ```
 ```