From: Gabriel Goller <g.goller@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH pathpatterns 0/2] remove unsafe std::mem::transmute
Date: Mon, 18 Sep 2023 15:41:07 +0200 [thread overview]
Message-ID: <20230918134109.179258-1-g.goller@proxmox.com> (raw)
In the `MatchList` trait we have a function `matches`, which uses the
unsafe `std::mem::transmute` function to 'force-cast' to a different
type [0]. We can avoid this by adding a lifetime to the `MatchList`
trait and the `&self` parameter. This only requires a single change
in `proxmox-backup` to work.
[0]: https://doc.rust-lang.org/nomicon/transmutes.html
pathpatterns:
Gabriel Goller (1):
match_list: remove unsafe std::mem::transmute
src/match_list.rs | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
proxmox-backup:
Gabriel Goller (1):
datastore: catalog: added lifetime to find function
pbs-datastore/src/catalog.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.39.2
next reply other threads:[~2023-09-18 13:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 13:41 Gabriel Goller [this message]
2023-09-18 13:41 ` [pbs-devel] [PATCH pathpatterns 1/2] match_list: " Gabriel Goller
2023-09-18 13:41 ` [pbs-devel] [PATCH proxmox-backup 2/2] datastore: catalog: added lifetime to find function Gabriel Goller
2023-10-11 11:07 ` Gabriel Goller
2023-10-19 9:16 ` [pbs-devel] applied: [PATCH pathpatterns 0/2] remove unsafe std::mem::transmute Wolfgang Bumiller
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=20230918134109.179258-1-g.goller@proxmox.com \
--to=g.goller@proxmox.com \
--cc=pbs-devel@lists.proxmox.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.