mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Remove unnecessary Numeric constraint
This commit is contained in:
1 parent
20800ed454
commit
dccbbf0bb7
1 file changed
+2
-2
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user