From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id wAFyNXfmTWedtQAAe85BDQ:P1 (envelope-from ) for ; Mon, 02 Dec 2024 16:55:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id wAFyNXfmTWedtQAAe85BDQ (envelope-from ) for ; Mon, 02 Dec 2024 17:55:19 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=qiAwSBBe; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Ut69OFcT; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733158519; a=rsa-sha256; cv=none; b=g4E6bsWTmI/V7BUfa7juWu7kP56JrPu2UR33/Rpz6ubpnIta6teylX6RCBrzOw57/44Crb lAukyGciDrC+dYnyZw85vzxcXvCkR2tk+rIDZWN2NCj7y09msJD3SUeQwR//e06jcxTbDs UY8I/YzululQMg7u4uig6wdxRJnaaHWv8QVFXmBPGR7ZLRFyeUASIsqomBZR0FsOHiOxVm 1WAbb+vAe+WFnnss7PgkqSCbouTO0GaXufQUVap3M378pw2sF0g7FybCk3t2hdJSW0Zgak OzweFsTtT28bhEtJXVBlrpQaST5prhYtR18HvStRpwX3ucEewDU1VCr2zluRjA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=qiAwSBBe; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Ut69OFcT; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1733158519; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=r2ivJS6nZrVmPSTJnpfzcn2cGH/gAsCMTGifmiQG4/E=; b=LgcsertyMvVxndi+NztA3qTZQ5kuDjLCZQkYYFB1LUA7ADtO9hJZSn/9MjkPkf6tQgak4f tuHV24VXKXUrKwwrPq9lSDsPx6U9/85VStDvSPScsydZPaZnuI+68lamdxieshpYy7tO2Q pKaxsAjd+t9Ay/YzQPvHFCL8K6AWBpneBB7xJaqrqN31tfrMrKR2qsHYxF24UwDGCPP8Z/ KmAmHnHxm3U92OZ/OLhcQD8YXgV8gdZFMuW5wR1jKIkeChGFSPj9xWAMgtrYRDuAvtl/iX 2DgMePp3aG/YCirSrHxy78ETqe88Lxrkk+EBJj1uabXR/IvEK4YWPe1FHbqaoQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C1D2F7B401 for ; Mon, 02 Dec 2024 17:55:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tI9hZ-0003zH-Dv; Mon, 02 Dec 2024 11:55:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tI9hQ-0003lo-D3 for guix-patches@gnu.org; Mon, 02 Dec 2024 11:55:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tI9hQ-0007rg-42 for guix-patches@gnu.org; Mon, 02 Dec 2024 11:55:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=r2ivJS6nZrVmPSTJnpfzcn2cGH/gAsCMTGifmiQG4/E=; b=qiAwSBBeX3xVDdy3rdUW+qCJTAKvqPwg1Q8vTuqptU5cqNx7l8JKWF5fDqyXIZFEOky2ytK0N5vk1eMy4V1kMNeRwYy0bLmGR/i9fUyr2SqJJfxYlQXw+luSgbpjEqIQFekL6DVeUgAGJG00Ws5Kgy3Ftzf4qg+fX8lG78YeCwCY/AS/lmPZ+hqpCGR7Cr5O6TRFBQzIW9AePVqQDGo4iF4aYOHCG8GCKpjC1bF+AqNY3pbuq0gtdKW0gV9VAqBjuL1hz6YwiQ8vWQhaZFAYP792GxYZgoWXEpnI1aH1Ii/tp5lZf+4aQBCtMNxjr/RUnbkOjgd66yHRXBPjgQfGGQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tI9hP-000366-Pa; Mon, 02 Dec 2024 11:55:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74654] [PATCH 3/5] build-system/cargo: Simplify =?UTF-8?Q?=E2=80=98crate-closure=E2=80=99.?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Mon, 02 Dec 2024 16:55:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74654 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74654@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Efraim Flashner X-Debbugs-Original-Xcc: Efraim Flashner Received: via spool by 74654-submit@debbugs.gnu.org id=B74654.173315845611779 (code B ref 74654); Mon, 02 Dec 2024 16:55:03 +0000 Received: (at 74654) by debbugs.gnu.org; 2 Dec 2024 16:54:16 +0000 Received: from localhost ([127.0.0.1]:56360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI9gc-00033j-7Z for submit@debbugs.gnu.org; Mon, 02 Dec 2024 11:54:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI9gX-00032z-Tb for 74654@debbugs.gnu.org; Mon, 02 Dec 2024 11:54:10 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tI9gS-0007Mq-7h; Mon, 02 Dec 2024 11:54:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=r2ivJS6nZrVmPSTJnpfzcn2cGH/gAsCMTGifmiQG4/E=; b=Ut69OFcTxximwad4t+Il JIivHHSX6IwpW3dmpy2ssCl6gCpcZaRrTt7MOwF+qnV3hT5IidWZuAZAJdXkPC5CIx9KYJ3HakNQd AcQF4M2RxsBlGsvot6WeDzZp/3ewulARUYztYJ9FBYD7YHjm38RWCJZpicwlltugOKJwR0lKY2dOM s8tmrCLHyCoelPwrvEZXlto1/iOO5vQwbcjFEs6ntGltPzLwnB8xN9T9YagUlR8eWJu3hNh4pu+pW LmgBw2XTBqDCYb6LzF3o2lzhRk91qtxakSMKjwqxnP5jVvPxawUo66uSmuzaTE981/uEvHXzSHXFd dvGPtX4+cPrF/A==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Mon, 2 Dec 2024 17:53:28 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: C1D2F7B401 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -2.02 X-Spam-Score: -2.02 X-TUID: POmpjEfx/mph * guix/build-system/cargo.scm (crate-closure): Remove ‘first?’. Change-Id: Ica1a661eb422a882ae3a1a54819b2dd7d68449de --- guix/build-system/cargo.scm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index 658a2e525e..0e9a4b1d23 100644 --- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2021 Ludovic Courtès +;;; Copyright © 2013-2016, 2019, 2021, 2024 Ludovic Courtès ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2016 David Craven @@ -227,24 +227,22 @@ (define (crate-closure inputs) (let loop ((inputs inputs) (result '()) (propagated '()) - (first? #t) (seen vlist-null)) (match inputs (() (if (null? propagated) (reverse result) - (loop (reverse (concatenate propagated)) result '() #f seen))) + (loop (reverse (concatenate propagated)) result '() seen))) (((and input (label (? package? package))) rest ...) - (if (and (not first?) (seen? seen package)) - (loop rest result propagated first? seen) + (if (seen? seen package) + (loop rest result propagated seen) (loop rest (cons input result) (cons (package-cargo-inputs package) propagated) - first? (vhash-consq package package seen)))) ((input rest ...) - (loop rest (cons input result) propagated first? seen))))) + (loop rest (cons input result) propagated seen))))) (define (expand-crate-sources cargo-inputs cargo-development-inputs) "Extract all transitive sources for CARGO-INPUTS and CARGO-DEVELOPMENT-INPUTS -- 2.46.0