Readability

This commit is contained in:
Matt Joiner 2020-04-19 11:30:48 +10:00
parent 4a2802a702
commit 079f346ca9
1 changed files with 4 additions and 2 deletions

View File

@ -30,8 +30,10 @@ func (requestStrategyDefaults) iterUndirtiedChunks(p requestStrategyPiece, f fun
func (requestStrategyDefaults) nominalMaxRequests(cn requestStrategyConnection) int { func (requestStrategyDefaults) nominalMaxRequests(cn requestStrategyConnection) int {
return int( return int(
max(64, max(
cn.stats().ChunksReadUseful.Int64()-(cn.stats().ChunksRead.Int64()-cn.stats().ChunksReadUseful.Int64()))) 64,
cn.stats().ChunksReadUseful.Int64()-
(cn.stats().ChunksRead.Int64()-cn.stats().ChunksReadUseful.Int64())))
} }
func (requestStrategyDefaults) piecePriority(cn requestStrategyConnection, piece pieceIndex, tpp piecePriority, prio int) int { func (requestStrategyDefaults) piecePriority(cn requestStrategyConnection, piece pieceIndex, tpp piecePriority, prio int) int {