Re: [PATCH v2 2/3] rust: configfs: introduce rust support for configfs
From: Andreas Hindborg
Date: Tue Feb 18 2025 - 07:18:12 EST
Andreas Hindborg <a.hindborg@xxxxxxxxxx> writes:
> "Benno Lossin" <benno.lossin@xxxxxxxxx> writes:
>
>> On 17.02.25 12:08, Andreas Hindborg wrote:
>
> [...]
>
>>>>
>>>>> +//!
>>>>> +//! See the [rust_configfs.rs] sample for a full example use of this module.
>>>>
>>>> It could also be useful to just put the example directly here into the
>>>> docs instead of/additionally to having it as a sample.
>>>
>>> I don't think we should duplicate the code. As long as the link works, I
>>> think having it separately is fine.
>>
>> When I'm coding in my editor and read some docs directly in it, it often
>> is annoying to find a link, because then I have to open the docs in my
>> web-browser.
>> I understand that you don't want to duplicate the code (and it also is a
>> bit too much for a short example), so how about having a simpler
>> example? Maybe with only a single operation that has no associated data
>> (use `()`)?
>
> Sure, we can do that.
Actually, I am having some problems making the inline example compile.
`configfs_attrs!` references `THIS_MODULE`, which is not present for
doctests.
I'll add the example but mark it `ignore` ?
Best regards,
Andreas Hindborg