Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
Fixes wrong imports
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijs2704 committed Oct 2, 2016
1 parent 49e36ee commit 1e92a99
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Sources/VaporAPNS/VaporAPNS.swift
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import HTTP
import Transport
import Foundation
import SwiftString
import JSON
import Vapor
import CCurl
import Jay
import JSON
import Jay

public class VaporAPNS {
private var options: Options

private var httpClient: Client<TCPClientStream, Serializer<Request>, Parser<Response>>?
private var curlHandle: UnsafeMutableRawPointer

public init(certPath: String, keyPath: String, options: Options? = nil) throws {
Expand Down Expand Up @@ -128,7 +124,7 @@ public class VaporAPNS {
}
}

public func toNullTerminatedUtf8String(_ str: Bytes) -> Data? {
public func toNullTerminatedUtf8String(_ str: [UTF8.CodeUnit]) -> Data? {
// let cString = str.cString(using: String.Encoding.utf8)
return str.withUnsafeBufferPointer() { buffer -> Data? in
return buffer.baseAddress != nil ? Data(bytes: buffer.baseAddress!, count: buffer.count) : nil
Expand Down

0 comments on commit 1e92a99

Please sign in to comment.