mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-27 06:42:14 -05:00
substitute: Avoid repeated calls to 'length'.
* guix/scripts/substitute.scm (fetch-narinfos)[update-progress!]: Move 'length' call outside of lambda.
This commit is contained in:
parent
3d3e93b3f9
commit
75a4d86f50
1 changed files with 3 additions and 2 deletions
|
@ -601,13 +601,14 @@ (define (narinfo-from-file file url)
|
|||
(define (fetch-narinfos url paths)
|
||||
"Retrieve all the narinfos for PATHS from the cache at URL and return them."
|
||||
(define update-progress!
|
||||
(let ((done 0))
|
||||
(let ((done 0)
|
||||
(total (length paths)))
|
||||
(lambda ()
|
||||
(display #\cr (current-error-port))
|
||||
(force-output (current-error-port))
|
||||
(format (current-error-port)
|
||||
(G_ "updating list of substitutes from '~a'... ~5,1f%")
|
||||
url (* 100. (/ done (length paths))))
|
||||
url (* 100. (/ done total)))
|
||||
(set! done (+ 1 done)))))
|
||||
|
||||
(define hash-part->path
|
||||
|
|
Loading…
Reference in a new issue