Remove unnecessary Numeric constraint

This commit is contained in:
Max Moiseev committed 2017-11-08 14:46:10 -08:00
1 parent 20800ed454
commit dccbbf0bb7
1 file changed
+2 -2
+2 -2
View File
@@ -20,14 +20,14 @@ class ByteBufferTest: XCTestCase {
private let allocator = ByteBufferAllocator()
private var buf: ByteBuffer! = nil
private func setGetInt<T: Numeric & FixedWidthInteger>(index: Int, v: T) throws {
private func setGetInt<T: FixedWidthInteger>(index: Int, v: T) throws {
var buffer = allocator.buffer(capacity: 32)
XCTAssertEqual(MemoryLayout<T>.size, buffer.set(integer: v, at: index))
XCTAssertEqual(v, buffer.integer(at: index))
}
private func writeReadInt<T: Numeric & FixedWidthInteger>(v: T) throws {
private func writeReadInt<T: FixedWidthInteger>(v: T) throws {
var buffer = allocator.buffer(capacity: 32)
XCTAssertEqual(0, buffer.writerIndex)
XCTAssertEqual(MemoryLayout<T>.size, buffer.write(integer: v))