From 4cac55791176f0db521dce0b7918fd3daae8a0bb Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 5 Feb 2020 11:32:19 +0100 Subject: [PATCH] gnu: chromium.scm: Remove use of CADR. ...as per the style guidelines. * gnu/packages/chromium.scm (%debian-origin)[file-name]: Use MATCH instead of IF and CADR to compute the name. --- gnu/packages/chromium.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm index ecded29abd..49ad8de84c 100644 --- a/gnu/packages/chromium.scm +++ b/gnu/packages/chromium.scm @@ -69,7 +69,8 @@ (define-module (gnu packages chromium) #:use-module (gnu packages xiph) #:use-module (gnu packages xml) #:use-module (gnu packages xdisorg) - #:use-module (gnu packages xorg)) + #:use-module (gnu packages xorg) + #:use-module (ice-9 match)) (define %preserved-third-party-files '("base/third_party/cityhash" ;Expat @@ -278,9 +279,9 @@ (define %debian-origin (url "https://salsa.debian.org/chromium-team/chromium.git") (commit %debian-revision))) (file-name (git-file-name "debian-chromium-packaging" - (if (string-prefix? "debian/" %debian-revision) - (cadr (string-split %debian-revision #\/)) - (string-take %debian-revision 7)))) + (match (string-split %debian-revision #\/) + ((_ revision) revision) + (_ (string-take %debian-revision 7))))) (sha256 (base32 "1rbzxcwfp7v0c6rkvn9jl9by7p363cnbdyqazwiak1z03kmw3nkz"))))