Uploaded image for project: 'Swift Driver'
  1. Swift Driver
  2. SWIFT-201

Refactor "if failure" conditions with guard statements

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.0.4
    • Component/s: None
    • Labels:

      Description

      In mongodb/mongo-swift-driver#97, Kaitlin Mahar suggested:

      guard mongoc_some_operation(...) else { // throw err }
      

      rather than

      if !mongoc_some_operation(...) { // throw err }
      

        Attachments

          Activity

            People

            Assignee:
            may.hoque May Hoque
            Reporter:
            jmikola Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: