Re: [PATCH v3] rust: str: Use `core::CStr`, remove the custom `CStr` implementation

2024-07-17 Thread Michal Rostecki
On 16.07.24 02:45, Trevor Gross wrote: (also, v2 and v3 are appearing in different threads on lore (as they should), but they're in the same thread as v1 in my email client - any idea if there is a reason for this?) No idea, I've sent both patches with: git send-email --cc-cmd='./scripts/get_m

Re: [PATCH v3] rust: str: Use `core::CStr`, remove the custom `CStr` implementation

2024-07-15 Thread Trevor Gross
On Mon, Jul 15, 2024 at 5:14 PM Michal Rostecki wrote: > diff --git a/rust/kernel/kunit.rs b/rust/kernel/kunit.rs > index 0ba77276ae7e..c08f9dddaa6f 100644 > --- a/rust/kernel/kunit.rs > +++ b/rust/kernel/kunit.rs > [...] > // SAFETY: FFI call without safety requirements. >

[PATCH v3] rust: str: Use `core::CStr`, remove the custom `CStr` implementation

2024-07-15 Thread Michal Rostecki
`CStr` became a part of `core` library in Rust 1.75. This change replaces the custom `CStr` implementation with the one from `core`. `core::CStr` behaves generally the same as the removed implementation, with the following differences: - It does not implement `Display` (but implements `Debug`). T