<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/rust/kernel/transmute.rs, branch v6.17</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-10-09T22:33:42Z</updated>
<entry>
<title>rust: kernel: move `FromBytes` and `AsBytes` traits to a new `transmute` module</title>
<updated>2024-10-09T22:33:42Z</updated>
<author>
<name>Aliet Exposito Garcia</name>
<email>aliet.exposito@gmail.com</email>
</author>
<published>2024-09-18T22:51:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ce1c54fdff7c4556b08f5b875a331d8952e8b6b7'/>
<id>urn:sha1:ce1c54fdff7c4556b08f5b875a331d8952e8b6b7</id>
<content type='text'>
Refactor the `FromBytes` and `AsBytes` traits from `types.rs` into a new
`transmute.rs` module:

 - Add `rust/kernel/transmute.rs` with the definitions of `FromBytes`
   and `AsBytes`.

 - Remove the same trait definitions from `rust/kernel/types.rs`.

 - Update `rust/kernel/uaccess.rs` to import `AsBytes` and `FromBytes`
   from `transmute.rs`.

The traits and their implementations remain unchanged.

Suggested-by: Benno Lossin &lt;benno.lossin@proton.me&gt;
Link: https://github.com/Rust-for-Linux/linux/issues/1117
Signed-off-by: Aliet Exposito Garcia &lt;aliet.exposito@gmail.com&gt;
Reviewed-by: Fiona Behrens &lt;me@kloenk.dev&gt;
Reviewed-by: Benno Lossin &lt;benno.lossin@proton.me&gt;
Link: https://lore.kernel.org/r/20240918225115.2309224-2-aliet.exposito@gmail.com
[ Rebased on top of the lints series and slightly reworded. - Miguel ]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
</feed>
