Skip to content

Commit 8d7c46d

Browse files
authored
README: Remove comment about decodeIfPresent
It's a bit self-explanatory, given that the following line is using `try?`, and clutters up the code sample.
1 parent b930ac1 commit 8d7c46d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ struct Article: Codable {
101101
title = try decoder.decode("title")
102102
body = try decoder.decode("body")
103103
footnotes = try decoder.decodeIfPresent("footnotes")
104-
// Or if you prefer to ignore type errors for optional properties, you can use:
105-
// footnotes = try? decoder.decode("footnotes")
106104
tags = (try? decoder.decode("tags")) ?? []
107105
}
108106
}

0 commit comments

Comments
 (0)