Просмотр исходного кода

Merge pull request #1256 from onevcat/fix/doc-for-DefaultCacheSerializer

Update DefaultCacheSerializer doc
Wei Wang 6 лет назад
Родитель
Сommit
bc3453a35c
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      Sources/Cache/CacheSerializer.swift

+ 2 - 4
Sources/Cache/CacheSerializer.swift

@@ -92,10 +92,8 @@ public struct DefaultCacheSerializer: CacheSerializer {
     ///
     /// - Note:
     /// Only when `original` contains valid PNG, JPEG and GIF format data, the `image` will be
-    /// converted to the corresponding data type. Otherwise, if the `original` is provided but it is not
-    /// a valid format, the `original` data will be used for cache.
-    ///
-    /// If `original` is `nil`, the input `image` will be encoded as PNG data.
+    /// converted to the corresponding data type. Otherwise, if the `original` is `nil` or provided
+    /// as an invalid format, the input `image` will be encoded as PNG data.
     public func data(with image: Image, original: Data?) -> Data? {
         return image.kf.data(format: original?.kf.imageFormat ?? .unknown)
     }