Эх сурвалжийг харах

updated for new error handling

not using try? will cause a compile error.  Updated readme to match the new error handling changes.
abunur 10 жил өмнө
parent
commit
0bb7168d80
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      README.md

+ 1 - 1
README.md

@@ -94,7 +94,7 @@ keychain.set("01234567-89ab-cdef-0123-456789abcdef", key: "kishikawakatsumi")
 #### error handling
 
 ```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)")
 }
 ```