Re: [PATCH v12 1/3] rust: str: add radix prefixed integer parsing functions

2025-05-07 Thread Benno Lossin
On Wed May 7, 2025 at 11:15 AM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Tue May 6, 2025 at 3:02 PM CEST, Andreas Hindborg wrote: >>> +pub trait ParseInt: private::FromStrRadix + TryFrom { >>> +/// Parse a string according to the description in [`Self`]. >>> +

Re: [PATCH v12 1/3] rust: str: add radix prefixed integer parsing functions

2025-05-07 Thread Andreas Hindborg
"Benno Lossin" writes: > On Tue May 6, 2025 at 3:02 PM CEST, Andreas Hindborg wrote: >> diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs >> index 878111cb77bc..174e70397305 100644 >> --- a/rust/kernel/str.rs >> +++ b/rust/kernel/str.rs >> @@ -573,7 +573,6 @@ macro_rules! c_str { >> } >> >>

Re: [PATCH v12 1/3] rust: str: add radix prefixed integer parsing functions

2025-05-07 Thread Benno Lossin
On Tue May 6, 2025 at 3:02 PM CEST, Andreas Hindborg wrote: > diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs > index 878111cb77bc..174e70397305 100644 > --- a/rust/kernel/str.rs > +++ b/rust/kernel/str.rs > @@ -573,7 +573,6 @@ macro_rules! c_str { > } > > #[cfg(test)] > -#[expect(clippy::

[PATCH v12 1/3] rust: str: add radix prefixed integer parsing functions

2025-05-06 Thread Andreas Hindborg
Add the trait `ParseInt` for parsing string representations of integers where the string representations are optionally prefixed by a radix specifier. Implement the trait for the primitive integer types. Tested-by: Daniel Gomez Reviewed-by: Greg Kroah-Hartman Signed-off-by: Andreas Hindborg ---