Received: by 2002:ab2:6991:0:b0:1f2:fff1:ace7 with SMTP id v17csp198339lqo; Wed, 27 Mar 2024 10:26:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXm/WlXcagMopcvJTijN6zBVA11pWC4e+7yg3RaIupM1QvpT+0nSLpFKjX3nzaqBOLMjOcpLaART/6Ve+cxPhS5dS1youpGIqPRG2FSEw== X-Google-Smtp-Source: AGHT+IE6dhaz+IOpLkoDN2f4A/2pYJIc9eKtSgsqHnkn8QGFiGej0ih3jmdufJrB9MJHFwN55uH6 X-Received: by 2002:a17:902:e807:b0:1dd:6ce3:7442 with SMTP id u7-20020a170902e80700b001dd6ce37442mr391850plg.39.1711560372212; Wed, 27 Mar 2024 10:26:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711560372; cv=pass; d=google.com; s=arc-20160816; b=s0KeugWdYk1+kgF6eAyavRr2aiAbxrHc4FciytS7y11G4GYAkoNBg5fXYc5VD2Dkzt NaqJxOMjw8DBKSeXl8tEWtGD5Z/4iCHotByJRSbyplcO301uBClenz4a3dssXCbYY/vI +oWVNsgL2g/UD6Vc63Ub94U17+TN1J8qXLLK2udwY4Wri4aw6tAEdVHUi+m+3ORRBDGS D5l1wSPxyYbQo2640/iFXDvzvZByE2AMxNJYwPpxR+hNELSwxtqkM/d6Q6EK2F1qpUK5 ctUSF0t8f5mrGH18vgb/3v1QYzlO75hDQrlFhA/7Tge7cYPG1ONkRffF+CMfs8STkBQS zcSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=jF78QPjL6DlPZkbvtbKwmHduwM2y6T23zimXyjNJ41Q=; fh=ILXzPT3nbZXhvwVwwPDMnlxaRbCVxHwkAsH+01sTnAQ=; b=TWaY76WUXwXdA2IonfhwelefacTWeGJyTMVBZqv11lPKqvTvf7Zybm2qTv3rcZDPCa rWl55wmlk+ApANbYKi0KJg9yYkXaAfWziH+lzmHGMwO6GulLArSqV07lq8I+w6prWDfP qYBjR56kPcwocaiQM9ALKZ4GZE5/3cBmRQ/Vy8u/MIiZCnik3d/iyJNrlPg5l1V+IXth zMxCie1JIDu/Ypog9iNY7h0ZX6enIhoUz/lldYQQED2wHkdq0jMCRecLZBzuriaUm1nB NGDXVdVt2O2iD0n/tBs9+ClEj5LJvySPv0AMoEFhY9LWIs5BTZvlBSk/MKe6le1sL/u2 FuKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@proton.me header.s=protonmail header.b=CuZb1UjW; arc=pass (i=1 spf=pass spfdomain=proton.me dkim=pass dkdomain=proton.me dmarc=pass fromdomain=proton.me); spf=pass (google.com: domain of linux-kernel+bounces-121645-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121645-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t2-20020a17090340c200b001ddb6bbc698si9881327pld.107.2024.03.27.10.26.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 10:26:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-121645-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@proton.me header.s=protonmail header.b=CuZb1UjW; arc=pass (i=1 spf=pass spfdomain=proton.me dkim=pass dkdomain=proton.me dmarc=pass fromdomain=proton.me); spf=pass (google.com: domain of linux-kernel+bounces-121645-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121645-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1E7DEB24689 for ; Wed, 27 Mar 2024 16:45:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DD02129E81; Wed, 27 Mar 2024 16:45:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="CuZb1UjW" Received: from mail-40131.protonmail.ch (mail-40131.protonmail.ch [185.70.40.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECB3C130AF0 for ; Wed, 27 Mar 2024 16:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.40.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711557937; cv=none; b=DRyDc621aGw2aKU8GipO9df1Klg8lglkT7b1VxD2yF7bXRHtNEF25wPM5anVBFQFepZ0QQnxpIw+C8YsP7BNU3t4QovkJHE6wBYmLCqzlagx4W9qCsxUGI2voExr3b9xNQOtmBGeA4hBp4MKJwZnze9SgnS8HElJBR+8262Xmyo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711557937; c=relaxed/simple; bh=im+hs9xa1puCwNxQaY39vHOrcV3J947UuQJoHdhyznk=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=decWeaJe45m4SwUmIb5IT1ELb8iK4QMKN5M8xtcD8D2F1DCCAkZTIxghQWon04KKXf5O8HhjAj7p14JvFoplZ2enqdqAOngHSrwY4lESfJcZkmjfb696at7kL8e/cRAU/PwlWSUl0j3syQtI/XhAAsjrlPkrJ5iUy5g+YzCP1a0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b=CuZb1UjW; arc=none smtp.client-ip=185.70.40.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1711557932; x=1711817132; bh=jF78QPjL6DlPZkbvtbKwmHduwM2y6T23zimXyjNJ41Q=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=CuZb1UjWVr/UOJKrZSZyBj61bGhVXLe456n8AFnW2tvLiTeSYKkYySypKavni6vJI Z15C2mwMGrB1QfPhzBx/hzzdpye+3VMa1l6MKw0TB72o3SHo6VmqT0aKD1cBisfWkP IrOO3lzSBA8s7eymwHNN/0Wzug+oQu87WhMxT0TG41nrk5bs9Lz1u7KmrBSBhU3fOE x29vcuDerzd+S+B5bxB1tDw1/47+KO84AokNvlrgie6Mq08TNc++1BXNJgaAQwvWbh Z5bd276zDkEkG9YKBA5eb7mFB5svNkhu3enS2UWc5GERQphb+wWEBX4O30zLdNIU0v KqI6RvN35a+pQ== Date: Wed, 27 Mar 2024 16:45:11 +0000 To: Wedson Almeida Filho , rust-for-linux@vger.kernel.org From: Benno Lossin Cc: Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Alice Ryhl , linux-kernel@vger.kernel.org, Wedson Almeida Filho Subject: Re: [PATCH v2 02/10] rust: alloc: introduce the `VecExt` trait Message-ID: <73c58833-71a9-493c-8f9c-78f7557ec3e2@proton.me> In-Reply-To: <20240327023531.187880-3-wedsonaf@gmail.com> References: <20240327023531.187880-1-wedsonaf@gmail.com> <20240327023531.187880-3-wedsonaf@gmail.com> Feedback-ID: 71780778:user:proton Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 27.03.24 03:35, Wedson Almeida Filho wrote: > From: Wedson Almeida Filho >=20 > Make `try_with_capacity`, `try_push`, and `try_extend_from_slice` > methods available in `Vec` even though it doesn't implement them. It is > implemented with `try_reserve` and `push_within_capacity`. >=20 > This is in preparation for switching to the upstream `alloc` crate. >=20 > Suggested-by: Gary Guo > Signed-off-by: Wedson Almeida Filho > --- > rust/kernel/alloc.rs | 1 + > rust/kernel/alloc/vec_ext.rs | 48 ++++++++++++++++++++++++++++++++++++ > rust/kernel/lib.rs | 1 + > rust/kernel/prelude.rs | 2 ++ > 4 files changed, 52 insertions(+) > create mode 100644 rust/kernel/alloc/vec_ext.rs Reviewed-by: Benno Lossin --=20 Cheers, Benno