mirror of
https://github.com/ollama/ollama.git
synced 2026-04-27 11:15:40 +02:00
x/registry: upload smoke test passing
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
type Chunk[I constraints.Integer] struct {
|
||||
Offset I
|
||||
Size I
|
||||
N I
|
||||
}
|
||||
|
||||
// Chunks yields a sequence of a part number and a Chunk. The Chunk is the offset
|
||||
@@ -21,7 +21,9 @@ func Chunks[I constraints.Integer](size, chunkSize I) iter.Seq2[int, Chunk[I]] {
|
||||
var n int
|
||||
for off := I(0); off < size; off += chunkSize {
|
||||
n++
|
||||
yield(n, Chunk[I]{off, min(chunkSize, size-off)})
|
||||
if !yield(n, Chunk[I]{off, min(chunkSize, size-off)}) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user