Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp909793rdb; Fri, 9 Feb 2024 05:06:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFghqYv+PtPfn1vZHwpF/RKtBsr+u/p6uoUVaW8K2xCikD68i6bIHRwQQSRxiBlt1I8qiKk X-Received: by 2002:a17:902:fc85:b0:1d9:a6e8:1c8c with SMTP id mf5-20020a170902fc8500b001d9a6e81c8cmr1546402plb.15.1707484001247; Fri, 09 Feb 2024 05:06:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707484001; cv=pass; d=google.com; s=arc-20160816; b=aY554n6GN2QD9kVpN3MpAaSSKpyxnX+dueAojAz5XSRdpEQk7LPH9WC0D3ZJ69JrkA qc9zUhdFU8Vky/PY1+1RBOPQxKFJr1euS9NzfTthwUvQMum6zeLp2pz8jRiOa7y80/bc 8s0S5Ci2ObjIgVclXVu/+OCtAk8nx6QBlea9u6TBpOoZL9wEYsdyaDT3GKBSjTJSbJEL GFO2NIRS/JROqVs96QO212/MqFqna0PTD98xO91wZUHUMObK8pnsUf6wVOMGNPiCgm9d iiGqjvz92oIh7S0itbnwkQ7qW2hAbDznr/ufhJHbZwFuq9KcuBq+sUq3cocY8quhKqYG kw8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=xXQlm8wYk42FKH3UwHT+zuLEtFefXsoBAX29Ffp/+rM=; fh=UxzsD4xI0YC0KiawMYTIVHrK+Ksk5rcFJqbkYYG/ZyU=; b=eU07wADETKK+aHQP9wrLnuLqJMQIh0uci3eLirUgR04YR+Vx+NATzSFrPsNm5ySFiS JwDDfnJ3t7weGteRkWojg+I5y3+H765liwbkiX8d63HwiHPw1szivhP6qejqZ00He92w bs0t0Syg7jMDOMiFtzg4cMq1bG0a0F07vmfp3ExGIZjdXOIZHCayP0I5J521+d0h4ust vwmpGBsrUAjuMuc642dhCcenVwxDkJMeX3tXdBRF+Qwcehw5dzSjvgqfyebW0XhAUxGH BBElv2pEcYV+3sicpER97mI/rnL0uha6gXgxYltedmrCD0b0iEWjPd0CLlxHDlW6CiNP CVDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WwTeX2LR; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-59338-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59338-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCWBXPjlJ/yehGM3rJmVBgeOYsm7r1xYf7aVjx/m5dMW50ihWAU/BDc42jUV7ARJoMuLAIRqAuxWhKZoh+WHkLKYuptpNPXI2nlDi27qag== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l5-20020a170903244500b001d9871e4da9si1646025pls.105.2024.02.09.05.06.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 05:06:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59338-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WwTeX2LR; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-59338-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59338-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E56EC282B05 for ; Fri, 9 Feb 2024 13:06:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 650B63839B; Fri, 9 Feb 2024 13:06:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="WwTeX2LR" Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34650381B1 for ; Fri, 9 Feb 2024 13:06:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707483979; cv=none; b=WoHpTCJLCP3t65wXMcEtA6UtE2uuaYlHEXs9wIX1P3zAwPIZudRSKPv3uaMJEXR05y6H9mspHk2XReV8mj45w5EbwXNDKvlNdK+nvhJ6X51VKhi9FThAtGxeCnbz5qzTjFH/wv0pipVmlAYp7XXkry9rS1cdp1SdYRqYzcJjuHI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707483979; c=relaxed/simple; bh=AEDphcx1FQNsF9qiJV4SSq7U2Kx5za3ZeN44KAWA2FE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=oipHgVfRkmjXFaXXILmLhLnCQdKRaPHxhGM5/1lZJNEmbuwVNaOZ+E/WZS2qdFaqLgIiH9sXzBv6v1Q5ZX9+Z+VfVqmPhcGf2zCY/EY+wpMmKaAwxUF5Pa0/AfTnzjBCP6cx6bD65Xzu2e9T2/d4DxbN4UDM5SiwWWW2JDy3BL0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=WwTeX2LR; arc=none smtp.client-ip=209.85.167.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3bbbc6e51d0so508242b6e.3 for ; Fri, 09 Feb 2024 05:06:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707483977; x=1708088777; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xXQlm8wYk42FKH3UwHT+zuLEtFefXsoBAX29Ffp/+rM=; b=WwTeX2LRlGkAll4d92KQdo6om0ZG1QnnW35qmWGLT5l8SkaRCjReuEmQD0Yir0csNh 9O2u1XWyGCQbLwHKSIVJjkfVLvz+TCJiq48t2E/yuL8EPifFItx7qTGiiOiLb3WCOACe m/cpk236SOUUY962yS6bx+jRf/hXjNEBqPxFTfjU9sdG4Av2i/E60wXDnpsz9KzkRgkr eRoKKmUDoyTpMAG1gKNIzB24rtoiQzM3H0RX0X9RZGPVS6UzY/a5JOMkLsIe5S0Quf/R uLYtAwiftINrihMpICQ0Mcu+LrDHq9ZXedsaW08oFMuJ7lkBc+UGuvfvtewBHxty0jX5 OqaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707483977; x=1708088777; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xXQlm8wYk42FKH3UwHT+zuLEtFefXsoBAX29Ffp/+rM=; b=OZPi8UDrSDT777JUZGgkE2G7SlaOdoauCjyZZLuleCpv/UMjjZa4fdaiRUJM/2SuZV Ul+q8mUzWn/y6jz06ojvh4/GcaVbyEnDCyO5SnZ2S2VVs7YnrrskepTayUwTQ0vMo7R7 IKgufcOuvrZmxwbQrWU8kPUvU1y+ujvV56LzkKGRaTzPWlxhTlWLxxOzegvTXCqGrfK0 HzuU/wAuXClJma2RlSHaxpJV78PIhGQxc1L+REtLwNaZvceNCgZnOz5L/s+1zActtC3C b01Wk5HYGpnb9HYVcqFou11MhfmzQirh9mq+fqZGc1nduX4remCUgLujgWnOVRm6eLMQ J/KQ== X-Gm-Message-State: AOJu0YwTPkKkGjpA13owW4y497ZmBoSLb7Z9mpk9iCC8nx1K6VoSc9cg FkXlV4K2mIqPQIIlwILJrp2UUutUy/t1BCQ8vv1emDNHIs8Ju/I69djIhKwR/W4785RZ8xeBInj xXz8JUOFjHWsQgLvySsDAnhRMG2q2N+iXk04P X-Received: by 2002:a05:6808:1b06:b0:3bf:c8cd:460d with SMTP id bx6-20020a0568081b0600b003bfc8cd460dmr1728600oib.1.1707483977082; Fri, 09 Feb 2024 05:06:17 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240205-b4-rbtree-v1-0-995e3eee38c0@google.com> <20240205-b4-rbtree-v1-3-995e3eee38c0@google.com> In-Reply-To: <20240205-b4-rbtree-v1-3-995e3eee38c0@google.com> From: Alice Ryhl Date: Fri, 9 Feb 2024 14:06:05 +0100 Message-ID: Subject: Re: [PATCH 3/6] rust: rbtree: add `RBTreeIterator` To: mattgilbride@google.com Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Greg Kroah-Hartman , =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Carlos Llamas , Suren Baghdasaryan , Christian Brauner , Rob Landley , Davidlohr Bueso , Michel Lespinasse , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 5, 2024 at 4:50=E2=80=AFPM wrote: > > From: Wedson Almeida Filho > > - Add Iterator implementation (`RBTreeIterator`) for `RBTree`, allowing > iteration over (key, value) pairs in key order. > - Add individual `keys()` and `values()` functions to iterate over keys > or values alone. > - Update doctests to use iteration instead of explicitly getting items. > > Iteration is needed by the binder driver to enumerate all values in a > tree for oneway spam detection [1]. > > Link: https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-17-0= 8ba9197f637@google.com/ [1] > Signed-off-by: Wedson Almeida Filho > Signed-off-by: Matt Gilbride I have looked at these bindings many times over the past year. They look good to me. Reviewed-by: Alice Ryhl These abstractions have been very heavily exercised by the Rust Binder driver. Tested-by: Alice Ryhl