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 2ADFE21EBBC; Tue, 12 Nov 2024 10:50:02 +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=1731408602; cv=none; b=QCJp7sRhTG8BqWDeAi6HXrDNB/X57Y7z41D030RuKTMUGDADGAjZDC8nleErgohcH33DnCX61FxjAipTZTF9KwZ3S1ge38hjP1TqXFEeYTdEuNVfNhMakr5cgU+6DB03/Yeb5bIHaiu3tHQNs0Ndn4Z/Ls16ER1jPz9a53n8EZI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731408602; c=relaxed/simple; bh=2LtJ6LIQPEot/STYnu9LrFvWXA/RX5wArFzBBTsAx2s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=JNLj6Hn7u+2BymxlGwwTwnDQ3LuVVh+LBZp786jZ3MR6LTViGjsXpAfV1fi08osuaz+bEZ+cLYzpf5mQEXAnimqY0VyrYm6d/HghOyK1+scpYwSk+3i6DS4xoAOCxd0HbbHt5JBQOxMrsAk+C2wOK+/nC6eBB/RUU1GSXG2h4k0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MHWiZsx5; 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="MHWiZsx5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D2BDC4CECD; Tue, 12 Nov 2024 10:49:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731408601; bh=2LtJ6LIQPEot/STYnu9LrFvWXA/RX5wArFzBBTsAx2s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=MHWiZsx5g5c/wb5hwqf8jDj/qIVTD7cSuQ1WoYF79llfbS1Qz0wGnxGG8GwvmWAQr 8QAqHVS6nURmY3PMOF4Ke1AFyqjB/5UC4LvTQRT6bjRbN4LEQbeYDh+gP5+BUB2pck Hs+EGcp8lfOebj+bt7AZ3cVht7L0Zxa31k+WL+6mtx3ebfNKgOQVwowhQlLpu5Ywaz z1kjOrTiiw9DQKBk34J9qD2PuROqTGjfxt2dWgC8P3hCUFs15UaRknatDWJJO4QOjP LCqKbcmr7hg2xGN8kCXQdK05+zOw70hXySh2OkXSFCqKAJ4LKFzj1FDBvPZYiRgJBV gp7SXt9gBIC+Q== From: Andreas Hindborg To: "Tamir Duberstein" Cc: "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?Q?Bj=C3=B6rn?= Roy Baron , "Benno Lossin" , "Alice Ryhl" , "Trevor Gross" , "Danilo Krummrich" , , Subject: Re: [PATCH v4 2/6] rust: types: avoid `as` casts In-Reply-To: <20241110-borrow-mut-v4-2-053976068215@gmail.com> (Tamir Duberstein's message of "Sun, 10 Nov 2024 09:14:03 -0500") References: <20241110-borrow-mut-v4-0-053976068215@gmail.com> <20241110-borrow-mut-v4-2-053976068215@gmail.com> Date: Tue, 12 Nov 2024 11:09:13 +0100 Message-ID: <875xossr06.fsf@kernel.org> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Tamir Duberstein" writes: > Replace `as` casts with `cast{,_mut}` calls which are a bit safer. > > In one instance, remove an unnecessary `as` cast without replacement. > > Reviewed-by: Alice Ryhl > Signed-off-by: Tamir Duberstein Reviewed-by: Andreas Hindborg Best regards, Andreas Hindborg