Set default value of stringEncoding parameter in Future<Data>.csvTo(_:stringDecoding:) method to .utf32

This commit is contained in:
Caleb Kleveter 2018-05-09 13:54:38 -05:00
parent 17d0bd94cf
commit 7f5b8328dd
No known key found for this signature in database
GPG Key ID: 30A5A6F3A0ED7EDA
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ extension Future where T == Data {
}
}
public func csvTo<T>(_ type: T.Type, stringEncoding: String.Encoding = .utf8) -> Future<[T]> where T: Decodable {
public func csvTo<T>(_ type: T.Type, stringEncoding: String.Encoding = .utf32) -> Future<[T]> where T: Decodable {
return self.map(to: [T].self) { (data) in
return try _CSVDecoder.decode(T.self, from: data, stringDecoding: stringEncoding)
}