Re: [PATCH v7] rust: transmute: Add methods for FromBytes trait

From: Christian
Date: Mon Jun 16 2025 - 16:08:19 EST


Hi, Miguel

> Please start with something like "Add methods ... and ... They are
> useful to ...", i.e. the idea is to try to explain the "what" and the
> "why" (what is being added, and why is it being added).

I see, sorry.

> > Signed-off-by: Every2 <christiansantoslima21@xxxxxxxxx>
>
> The previous version used your name in the SoB -- is this expected?

Not at all, I checked and my git config was messy. In the next patch
everything should be fine. Thanks for the feedback

> Can we do the cast earlier and then use `.is_aligned()` instead?

Of course.

> Also, since this is inside a macro, we should try to avoid assuming
> anything about the caller's code, so please use `::core` instead of
> `core`.

I noticed that core is used in other places, is it worth using as
default dependency since other people use it and reduce verbosity of
the code?

> Also, this is still missing safety comments on top of a couple
> `unsafe` blocks (pointed out in an earlier version). Are you building
> with `make ..... CLIPPY=1`?

No, but I'll activate it now, Thanks for the valuable feedback!

Cheers,
Christian