[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230921213440.202017-1-wedsonaf@gmail.com>
Date: Thu, 21 Sep 2023 18:34:38 -0300
From: Wedson Almeida Filho <wedsonaf@...il.com>
To: rust-for-linux@...r.kernel.org
Cc: Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...sung.com>,
Alice Ryhl <aliceryhl@...gle.com>,
linux-kernel@...r.kernel.org,
Wedson Almeida Filho <walmeida@...rosoft.com>
Subject: [PATCH 0/2] Remove `ArcBorrow`
From: Wedson Almeida Filho <walmeida@...rosoft.com>
In this small series we remove `ArcBorrow<'_, T>` and replace it with
`&WithRef<T>`, which we used to call `ArcInner` -- it is renamed
because it is now public, so we chose a more meaningful name.
This simplifies the code because we remove a type and have simpler
syntax to refer to borrowed arcs: `ArcBorrow<'a, T>` vs
`&'a WithRef<T>`.
This became possible when we adopted GATs in 2021 but we only realised
it recently (thanks Boqun!), more details on this zulip thread:
https://rust-for-linux.zulipchat.com/#narrow/stream/291566-Library/topic/Isn't.20.60ArcBorrow.60.20just.20.60.26ArcInner.3CT.3E.60.3F
Wedson Almeida Filho (2):
rust: arc: rename `ArcInner` to `WithRef`
rust: arc: remove `ArcBorrow` in favour of `WithRef`
rust/kernel/sync.rs | 2 +-
rust/kernel/sync/arc.rs | 192 ++++++++++-------------------
rust/kernel/sync/arc/std_vendor.rs | 4 +-
3 files changed, 70 insertions(+), 128 deletions(-)
base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
--
2.34.1
Powered by blists - more mailing lists