From ba97e454bfbc168098212b37881b50b4fe6e1eb2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 21 Apr 2017 17:18:54 +0200 Subject: offload: Avoid using '_' as a 'match' pattern. * guix/scripts/offload.scm (host-key->type+key, machine-load) (process-request, guix-offload): Do not use '_' as a 'match' pattern. --- guix/scripts/offload.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'guix') diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index 6a4ae28689..acdfb81698 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2016 Ludovic Courtès +;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -148,7 +148,7 @@ (define (type->symbol type) (string->symbol (string-drop type 4)))) (match (string-tokenize host-key) - ((type key _) + ((type key x) (values (type->symbol type) key)) ((type key) (values (type->symbol type) key)))) @@ -403,7 +403,7 @@ (define (machine-load machine) (if (eof-object? line) +inf.0 ;MACHINE does not respond, so assume it is infinitely loaded (match (string-tokenize line) - ((one five fifteen . _) + ((one five fifteen . x) (let* ((raw (string->number five)) (jobs (build-machine-parallel-builds machine)) (normalized (/ raw jobs))) @@ -411,9 +411,9 @@ (define (machine-load machine) (normalized: ~s)~%" (build-machine-name machine) raw normalized) normalized)) - (_ + (x +inf.0))))) ;something's fishy about MACHINE, so avoid it - (_ + (x +inf.0))) ;failed to connect to MACHINE, so avoid it (define (machine-lock-file machine hint) @@ -503,7 +503,7 @@ (define* (process-request wants-local? system drv features (() ;; We'll never be able to match REQS. (display "# decline\n")) - ((_ ...) + ((x ...) (let ((machine (choose-build-machine candidates))) (if machine (begin @@ -671,7 +671,7 @@ (define not-coma build-machine-name))) ((file) (values file (const #t))) (() (values %machine-file (const #t))) - (_ (leave (_ "wrong number of arguments~%")))))) + (x (leave (_ "wrong number of arguments~%")))))) (check-machine-availability (or file %machine-file) pred)))) (("--version") (show-version-and-exit "guix offload")) -- cgit v1.2.3