From 924bf42f093c3be51e5587f8ef8fc43afa86dce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 30 Sep 2025 10:42:42 +0200 Subject: [PATCH] =?UTF-8?q?records:=20Avoid=20code=20duplication=20in=20?= =?UTF-8?q?=E2=80=98match-record-lambda=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/records.scm (match-record-lambda): Express in terms of ‘match-record’. Change-Id: I5a577055fe47e01af4c282f1a76ea72648e778d1 --- guix/records.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/guix/records.scm b/guix/records.scm index 82fe377e694de614962ddb3155af8cf6a5b6d441..fb263ab6d77117f07d34af9388dc80809c3521ab 100644 --- a/guix/records.scm +++ b/guix/records.scm @@ -680,8 +680,7 @@ FIELD will be bound to its FIELD name within the returned procedure. A syntax e is raised if an unknown field is queried." ((_ type (field ...) body ...) (lambda (record) - (if (eq? (struct-vtable record) type) - (match-record-inner record type (field ...) body ...) - (throw 'wrong-type-arg record)))))) + (match-record record type (field ...) + body ...))))) ;;; records.scm ends here