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

2024-07-17 Thread Michal Rostecki
On 16.07.24 09:44, Miguel Ojeda wrote: On Mon, Jul 15, 2024 at 6:12 PM Michal Rostecki wrote: @@ -71,11 +75,11 @@ macro_rules! kunit_assert { // // This mimics KUnit's failed assertion format. $crate::kunit::err(format_args!( -

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

2024-07-16 Thread Miguel Ojeda
On Mon, Jul 15, 2024 at 6:12 PM Michal Rostecki wrote: > > @@ -71,11 +75,11 @@ macro_rules! kunit_assert { > // > // This mimics KUnit's failed assertion format. > $crate::kunit::err(format_args!( > -"# {}: ASSERTION FAI

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

2024-07-15 Thread Michal Rostecki
On 15.07.24 17:56, Björn Roy Baron wrote: On Monday, July 15th, 2024 at 17:46, Michal Rostecki wrote: On 14.07.24 19:01, Björn Roy Baron wrote: On Sunday, July 14th, 2024 at 18:02, Michal Rostecki wrote: `CStr` became a part of `core` library in Rust 1.75, therefore there is no need to k

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

2024-07-15 Thread Michal Rostecki
On 14.07.24 19:30, Miguel Ojeda wrote: Hi Michal, Thanks for the patch! Some notes below... On Sun, Jul 14, 2024 at 6:02 PM Michal Rostecki wrote: `CStr` became a part of `core` library in Rust 1.75, therefore there is no need to keep the custom implementation. It would depend on the diffe

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

2024-07-15 Thread Björn Roy Baron
On Monday, July 15th, 2024 at 17:46, Michal Rostecki wrote: > On 14.07.24 19:01, Björn Roy Baron wrote: > > On Sunday, July 14th, 2024 at 18:02, Michal Rostecki > > wrote: > > > >> `CStr` became a part of `core` library in Rust 1.75, therefore there is > >> no need to keep the custom implement

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

2024-07-15 Thread Michal Rostecki
On 14.07.24 19:01, Björn Roy Baron wrote: On Sunday, July 14th, 2024 at 18:02, Michal Rostecki wrote: `CStr` became a part of `core` library in Rust 1.75, therefore there is no need to keep the custom implementation. `core::CStr` behaves generally the same as the removed implementation, with

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

2024-07-14 Thread Miguel Ojeda
Hi Michal, Thanks for the patch! Some notes below... On Sun, Jul 14, 2024 at 6:02 PM Michal Rostecki wrote: > > `CStr` became a part of `core` library in Rust 1.75, therefore there is > no need to keep the custom implementation. It would depend on the differences, right? i.e. for a reader, is t

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

2024-07-14 Thread Björn Roy Baron
On Sunday, July 14th, 2024 at 18:02, Michal Rostecki wrote: > `CStr` became a part of `core` library in Rust 1.75, therefore there is > no need to keep the custom implementation. > > `core::CStr` behaves generally the same as the removed implementation, > with the following differences: > > -

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

2024-07-14 Thread Michal Rostecki
`CStr` became a part of `core` library in Rust 1.75, therefore there is no need to keep the custom implementation. `core::CStr` behaves generally the same as the removed implementation, with the following differences: - It does not implement `Display` (but implements `Debug`). - It does not provi