From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E30E126658F; Mon, 28 Jul 2025 13:25:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753709155; cv=none; b=mhNZPHVHwsDajBWatS8nqfckYy3PSyE/X5Bh7jAH381eMmiGzQIXZ+AgHBMqa3g1vlm7YuCO5F4LlW3Zsf/9xqero8rDe7V4091GB2cYKXx73a4VP4y6fa3jBB01EF/YnBd8CwutIG0uQpneGEm3y/k1EztnWMGmyigqAlNAhJU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753709155; c=relaxed/simple; bh=rDm3Fm72ZlOTFamAPbV74WlAfxnrI5Knrz05ONOH8G0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lYSzRdtt+SOCR/Ee6W9AK9x922/H6zqbZga7pjPqfUHcWlV/JgbzdA5V0gLW0tkmZ4mNAnFS8AnBOB5IIdlC4hpZTFNR5W1VguISu6zCzVFqaEPSefaahEz5ezRhiUAhIaGyKKD2TFgrwWEwrIUJagVgWf5X7ke+0Zh4MYIxm+Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aFqfYIKT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aFqfYIKT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EFA9C4CEE7; Mon, 28 Jul 2025 13:25:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753709154; bh=rDm3Fm72ZlOTFamAPbV74WlAfxnrI5Knrz05ONOH8G0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=aFqfYIKTrLVYdxJWqRoIPRFA8BuxEJHgjBOIkETzsbWwRtpc/oJFwYAD1fOQWnngB yCby1BEc0GxrVBeUZcXaaM3t18MDAylYsgEhB2cEC+5eHfjWCIA7VcFX+g8IRAZo4M ir6+XnaYmsGS3vNQ0goe1TDCtUcoENZl/jLLe3ZOR2vp10ebGm1RKa3kM8AnWr+J41 eOaVwxrv20pdmrpoTM/a2gjmb9Yx820KuPezuMat4Cacv1vY3B9Sy6MYs9LQaLWb9Q nU/pO5I7vium0CWWHweneRQS3k92rufVa1RBTZYnpulvzwnxJgm5BKwypcnJ0ufG4Q PeXUa4+Wse7dQ== Message-ID: Date: Mon, 28 Jul 2025 15:25:49 +0200 Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/2] rust: transmute: add `as_bytes_mut` method to `AsBytes` trait To: Alexandre Courbot Cc: Abdiel Janulgue , Daniel Almeida , Robin Murphy , Andreas Hindborg , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Alice Ryhl , Trevor Gross , "Christian S. Lima" , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org References: <20250728-as_bytes-v4-0-b9156af37e33@nvidia.com> <20250728-as_bytes-v4-2-b9156af37e33@nvidia.com> From: Danilo Krummrich Content-Language: en-US In-Reply-To: <20250728-as_bytes-v4-2-b9156af37e33@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/28/25 2:47 PM, Alexandre Courbot wrote: > Types that implement both `AsBytes` and `FromBytes` can be safely > modified as a slice of bytes. Add a `as_bytes_mut` method for that > purpose. > > Signed-off-by: Alexandre Courbot Reviewed-by: Danilo Krummrich