Re: [PATCH] rust: Use consistent "# Examples" heading style in rustdoc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue Jun 10, 2025 at 6:37 AM CEST, Viresh Kumar wrote:
> Use a consistent `# Examples` heading in rustdoc across the codebase.
>
> Some modules previously used `## Examples` or `# Example`, which deviates
> from the preferred `# Examples` style.
>
> Suggested-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
> Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
> ---
>  rust/kernel/block/mq.rs  |  2 +-
>  rust/kernel/clk.rs       |  6 +++---
>  rust/kernel/configfs.rs  |  2 +-
>  rust/kernel/cpufreq.rs   |  8 ++++----
>  rust/kernel/cpumask.rs   |  4 ++--
>  rust/kernel/devres.rs    |  4 ++--
>  rust/kernel/firmware.rs  |  4 ++--
>  rust/kernel/opp.rs       | 16 ++++++++--------
>  rust/kernel/pci.rs       |  4 ++--
>  rust/kernel/platform.rs  |  2 +-
>  rust/kernel/sync.rs      |  2 +-
>  rust/kernel/workqueue.rs |  2 +-
>  rust/pin-init/src/lib.rs |  2 +-
>  13 files changed, 29 insertions(+), 29 deletions(-)


> diff --git a/rust/pin-init/src/lib.rs b/rust/pin-init/src/lib.rs
> index 9ab34036e6bc..c5f395b44ec8 100644
> --- a/rust/pin-init/src/lib.rs
> +++ b/rust/pin-init/src/lib.rs
> @@ -953,7 +953,7 @@ macro_rules! try_init {
>  /// Asserts that a field on a struct using `#[pin_data]` is marked with `#[pin]` ie. that it is
>  /// structurally pinned.
>  ///
> -/// # Example
> +/// # Examples
>  ///
>  /// This will succeed:
>  /// ```

@Miguel, if you take this, then:

Acked-by: Benno Lossin <lossin@xxxxxxxxxx>

For such a small change I don't mind upstreaming it myself, but if
Viresh wants to have a merged GitHub PR in pin-init, then we can take it
that route.

---
Cheers,
Benno





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux