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

Fix UnsafeMutableRawPointer! deprecation warnings in Swift 4.1+

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 0.0.8
    • None

    Description

      Building the driver in Swift 4.1+, one gets a few deprecation warnings of the form

      /Users/kaitlinmahar/mongo-swift-driver/Sources/MongoSwift/APM.swift:444:78: warning: using '!' in this location is deprecated and will be removed in a future release; consider changing this to '?' instead
                                                   contextFunc: (OpaquePointer) -> UnsafeMutableRawPointer!
                                                                                                        ^                                         ~
                                                                                                                                                   ?
      

      We should fix these. It is possible that the code will still build in 4.0 with the ?, so we should try that approach before doing inline version checks.

      Attachments

        Issue Links

          Activity

            People

              kaitlin.mahar@mongodb.com Kaitlin Mahar
              kaitlin.mahar@mongodb.com Kaitlin Mahar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: