Jelajahi Sumber

Merge pull request #473 from mtgto/fix_misspell

Fix misspell `serialise`
Victor Sigler 5 tahun lalu
induk
melakukan
3eb9b897fa
2 mengubah file dengan 9 tambahan dan 5 penghapusan
  1. 4 0
      CHANGELOG.md
  2. 5 5
      XCode/Sources/HttpResponse.swift

+ 4 - 0
CHANGELOG.md

@@ -18,6 +18,10 @@ All notable changes to this project will be documented in this file. Changes not
 
 # [Unreleased]
 
+## Fixed
+
+- Fix misspell `serialise`. ([#473](https://github.com/httpswift/swifter/pull/473)) by [@mtgto](https://github.com/mtgto)
+
 # [1.5.0]
 
 ## Added

+ 5 - 5
XCode/Sources/HttpResponse.swift

@@ -51,8 +51,8 @@ public enum HttpResponseBody {
                     try $0.write(data)
                 })
             case .htmlBody(let body):
-                let serialised = "<html><meta charset=\"UTF-8\"><body>\(body)</body></html>"
-                let data = [UInt8](serialised.utf8)
+                let serialized = "<html><meta charset=\"UTF-8\"><body>\(body)</body></html>"
+                let data = [UInt8](serialized.utf8)
                 return (data.count, {
                     try $0.write(data)
                 })
@@ -61,14 +61,14 @@ public enum HttpResponseBody {
                     try $0.write(data)
                 })
             case .custom(let object, let closure):
-                let serialised = try closure(object)
-                let data = [UInt8](serialised.utf8)
+                let serialized = try closure(object)
+                let data = [UInt8](serialized.utf8)
                 return (data.count, {
                     try $0.write(data)
                 })
             }
         } catch {
-            let data = [UInt8]("Serialisation error: \(error)".utf8)
+            let data = [UInt8]("Serialization error: \(error)".utf8)
             return (data.count, {
                 try $0.write(data)
             })