From: Wedson Almeida Filho <wedsonaf@gmail.com>
To: rust-for-linux@vger.kernel.org
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@samsung.com>,
"Alice Ryhl" <aliceryhl@google.com>,
linux-kernel@vger.kernel.org,
"Wedson Almeida Filho" <walmeida@microsoft.com>
Subject: [PATCH 0/2] Remove `ArcBorrow`
Date: Thu, 21 Sep 2023 18:34:38 -0300 [thread overview]
Message-ID: <20230921213440.202017-1-wedsonaf@gmail.com> (raw)
From: Wedson Almeida Filho <walmeida@microsoft.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
next reply other threads:[~2023-09-21 21:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 21:34 Wedson Almeida Filho [this message]
2023-09-21 21:34 ` [PATCH 1/2] rust: arc: rename `ArcInner` to `WithRef` Wedson Almeida Filho
2023-09-21 21:47 ` Finn Behrens
2023-09-22 7:50 ` Benno Lossin
2023-09-22 15:26 ` Alice Ryhl
2023-09-22 22:52 ` Martin Rodriguez Reboredo
2023-09-23 0:06 ` Gary Guo
2023-09-21 21:34 ` [PATCH 2/2] rust: arc: remove `ArcBorrow` in favour of `WithRef` Wedson Almeida Filho
2023-09-22 8:53 ` Benno Lossin
2023-09-23 14:01 ` Wedson Almeida Filho
2023-09-22 15:29 ` Alice Ryhl
2023-09-22 19:50 ` Benno Lossin
2023-09-23 14:07 ` Wedson Almeida Filho
2023-09-22 22:55 ` Martin Rodriguez Reboredo
2023-09-23 0:16 ` Gary Guo
2023-09-22 22:53 ` Martin Rodriguez Reboredo
2023-09-23 0:12 ` Gary Guo
2023-09-23 14:11 ` Wedson Almeida Filho
2023-09-23 14:15 ` Alice Ryhl
2023-09-23 14:20 ` Wedson Almeida Filho
2023-09-23 5:16 ` Jianguo Bao
2023-09-23 14:12 ` Wedson Almeida Filho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230921213440.202017-1-wedsonaf@gmail.com \
--to=wedsonaf@gmail.com \
--cc=a.hindborg@samsung.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=walmeida@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.