On 8/19/24 17:36, Michal Rostecki wrote:
From: 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
From: 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
`CStrDisplay` wrapper, with a custom `Display`
implementation.
`DerefMut` implementation for `CString` is removed here, as it's not
being used anywhere.
Signed-off-by: Michal Rostecki
---
v1 -> v2:
- Do not remove `c_str` macro. While it's preferred to use C-string
literals, there
`CStrDisplay` wrapper, with a custom `Display`
implementation.
`DerefMut` implementation for `CString` is removed here, as it's not
being used anywhere.
Signed-off-by: Michal Rostecki
---
v1 -> v2:
- Do not remove `c_str` macro. While it's preferred to use C-string
literals, there
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
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
with
the owned `CString` type.
- It has `as_ptr()` method instead of `as_char_ptr()`, which also returns
`*const c_char`.
Signed-off-by: Michal Rostecki
---
v1 -> v2:
- Do not remove `c_str` macro. While it's preferred to use C-string
literals, there are two cases where `c_str` is help
&CStr`), while mutating is done only with
the owned `CString` type.
- It has `as_ptr()` method instead of `as_char_ptr()`, which also returns
`*const c_char`.
Signed-off-by: Michal Rostecki
---
v1 -> v2:
- Do not remove `c_str` macro. While it's preferred to use C-string
literals,
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
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
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
not supposed to be modified.
- It has `as_ptr()` method instead of `as_char_ptr()`, which also returns
`*const c_char`.
Rust also introduces C literals (`c""`), so the `c_str` macro is removed
here as well.
Signed-off-by: Michal Rostecki
---
rust/kernel/error.rs| 7 +-
rust/
12 matches
Mail list logo