Skip to content

Commit f3bd134

Browse files
committed
Add explicit return to "workaround" closure in ByteReader.isFinished
1 parent 6420c16 commit f3bd134

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Sources/ByteReader.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ public class ByteReader {
2525
public var isFinished: Bool {
2626
#if swift(>=4.1.50) || (swift(>=3.4) && !swift(>=4.0))
2727
return { (data: Data, offset: Int) -> Bool in
28-
data.endIndex <= offset
28+
return data.endIndex <= offset
2929
} (self.data, self.offset)
3030
#else
3131
return self.data.endIndex <= self.offset
3232
#endif
33-
3433
}
3534

3635
/// Amount of bytes left to read.

0 commit comments

Comments
 (0)