File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Plugins/RedisDriverPlugin Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -577,9 +577,11 @@ private extension RedisPluginConnection {
577577 let cStrings : [ UnsafeMutablePointer < CChar > ] = args. map { arg in
578578 let utf8 = Array ( arg. utf8)
579579 let ptr = UnsafeMutablePointer< CChar> . allocate( capacity: utf8. count + 1 )
580- if let base = utf8. withUnsafeBufferPointer ( { $0. baseAddress } ) {
581- base. withMemoryRebound ( to: CChar . self, capacity: utf8. count) { src in
582- ptr. initialize ( from: src, count: utf8. count)
580+ utf8. withUnsafeBufferPointer { buffer in
581+ if let base = buffer. baseAddress {
582+ base. withMemoryRebound ( to: CChar . self, capacity: utf8. count) { src in
583+ ptr. initialize ( from: src, count: utf8. count)
584+ }
583585 }
584586 }
585587 ptr [ utf8. count] = 0
You can’t perform that action at this time.
0 commit comments