浏览代码

removed NSError from the catch blocks in String.hexToBytes() as well as Array<UInt8>(hex) in order to fix error in travis ci tests

jose 8 年之前
父节点
当前提交
c8476fa4e8
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      Sources/CryptoSwift/Array+Extension.swift
  2. 1 1
      Sources/CryptoSwift/String+Extension.swift

+ 1 - 1
Sources/CryptoSwift/Array+Extension.swift

@@ -39,7 +39,7 @@ extension Array where Element: Integer, Element.IntegerLiteralType == UInt8 {
             try hex.streamHexBytes { (byte) in
                 self.append(byte as! Element)
             }
-        } catch _ as NSError{
+        } catch _{
             self.removeAll()
         }
     }

+ 1 - 1
Sources/CryptoSwift/String+Extension.swift

@@ -75,7 +75,7 @@ extension String {
             try self.streamHexBytes { (byte) in
                 bytes.append(byte)
             }
-        }catch _ as NSError{
+        }catch _{
             return []
         }