Skip to content

Commit

Permalink
Casting CFString to String is not failable
Browse files Browse the repository at this point in the history
  • Loading branch information
ishkawa committed Apr 17, 2015
1 parent cdbc193 commit be47537
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions APIKit/URLEncodedSerialization.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Foundation

private func escape(string: String) -> String {
return CFURLCreateStringByAddingPercentEscapes(nil, string, nil, "!*'();:@&=+$,/?%#[]", CFStringBuiltInEncodings.UTF8.rawValue) as! String
return CFURLCreateStringByAddingPercentEscapes(nil, string, nil, "!*'();:@&=+$,/?%#[]", CFStringBuiltInEncodings.UTF8.rawValue) as String
}

private func unescape(string: String) -> String {
return CFURLCreateStringByReplacingPercentEscapes(nil, string, nil) as! String
return CFURLCreateStringByReplacingPercentEscapes(nil, string, nil) as String
}

public class URLEncodedSerialization {
Expand Down

0 comments on commit be47537

Please sign in to comment.