From f44134154331a64b373c5ee4f45fbeb25dcc69ce Mon Sep 17 00:00:00 2001 From: "Ming C." Date: Sat, 17 Aug 2024 11:43:05 -0700 Subject: [PATCH] README.md: Fix sample code --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 3b3e53803..be3c783ff 100644 --- a/README.md +++ b/README.md @@ -5743,9 +5743,7 @@ Open a read-only connection to your resource: // HOW TO open a read-only connection to a database resource // Get the path to the database resource. -if let dbPath = Bundle.main.path(forResource: "db", ofType: "sqlite") - -if let dbPath { +if let dbPath = Bundle.main.path(forResource: "db", ofType: "sqlite") { // If the resource exists, open a read-only connection. // Writes are disallowed because resources can not be modified. var config = Configuration()