Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Commit a9642f2

Browse files
authored
Silence warning. (#861)
`var buffer` -> `let buffer`
1 parent 2406774 commit a9642f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/TensorFlow/Bindings/EagerExecution.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ internal struct TFE_Op: TFTensorOperation {
6666
@inlinable @inline(__always)
6767
internal func addInputList<T: TensorArrayProtocol>(_ input: T) {
6868
let count = input._tensorHandleCount
69-
var buffer = UnsafeMutableBufferPointer<CTensorHandle>.allocate(capacity: Int(count))
69+
let buffer = UnsafeMutableBufferPointer<CTensorHandle>.allocate(capacity: Int(count))
7070
defer { buffer.deallocate() }
7171
input._unpackTensorHandles(into: buffer.baseAddress)
7272
for i in 0..<Int(count) {

Sources/TensorFlow/Bindings/EagerExecution.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ internal struct TFE_Op: TFTensorOperation {
6666
@inlinable @inline(__always)
6767
internal func addInputList<T: TensorArrayProtocol>(_ input: T) {
6868
let count = input._tensorHandleCount
69-
var buffer = UnsafeMutableBufferPointer<CTensorHandle>.allocate(capacity: Int(count))
69+
let buffer = UnsafeMutableBufferPointer<CTensorHandle>.allocate(capacity: Int(count))
7070
defer { buffer.deallocate() }
7171
input._unpackTensorHandles(into: buffer.baseAddress)
7272
for i in 0..<Int(count) {

0 commit comments

Comments
 (0)