database: Adjust style of 'assqx-ref'.

* src/cuirass/database.scm (db-get-builds)[assqx-ref]: Rewrite with
'match'.
This commit is contained in:
Ludovic Courtès 2018-03-01 15:44:40 +01:00
parent 5ddd4b97a5
commit 36d7c93119
1 changed files with 7 additions and 6 deletions

View File

@ -373,12 +373,13 @@ FILTERS is an assoc list which possible keys are 'project | 'jobset | 'job |
;; XXX Change caller and remove
(define (assqx-ref filters key)
(if (null? filters)
#f
(match (car filters)
((xkey xvalue) (if (eq? key xkey)
xvalue
(assqx-ref (cdr filters) key))))))
(match filters
(()
#f)
(((xkey xvalue) rest ...)
(if (eq? key xkey)
xvalue
(assqx-ref rest key)))))
(define (format-output name path)
`(,name . ((#:path . ,path))))