aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Obst <[email protected]>2024-01-31 21:23:31 +0100
committerMiguel Ojeda <[email protected]>2024-02-18 21:22:27 +0100
commit6269fadf351eafad6f890091eed69875125285b6 (patch)
tree31941c6f5fc9e2f3d5b3c23fb05a8ff3fcd5b311
parentaf8b18d7404bfb82aa07a09ad5b53d33ab2955d8 (diff)
rust: kernel: add blank lines in front of code blocks
Throughout the code base, blank lines are used before starting a code block. Adapt outliers to improve consistency within the kernel crate. Signed-off-by: Valentin Obst <[email protected]> Reviewed-by: Trevor Gross <[email protected]> Reviewed-by: Martin Rodriguez Reboredo <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
-rw-r--r--rust/kernel/types.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/rust/kernel/types.rs b/rust/kernel/types.rs
index fdb778e65d79..8aabe348b194 100644
--- a/rust/kernel/types.rs
+++ b/rust/kernel/types.rs
@@ -90,6 +90,7 @@ impl ForeignOwnable for () {
///
/// In the example below, we have multiple exit paths and we want to log regardless of which one is
/// taken:
+///
/// ```
/// # use kernel::types::ScopeGuard;
/// fn example1(arg: bool) {
@@ -108,6 +109,7 @@ impl ForeignOwnable for () {
///
/// In the example below, we want to log the same message on all early exits but a different one on
/// the main exit path:
+///
/// ```
/// # use kernel::types::ScopeGuard;
/// fn example2(arg: bool) {
@@ -129,6 +131,7 @@ impl ForeignOwnable for () {
///
/// In the example below, we need a mutable object (the vector) to be accessible within the log
/// function, so we wrap it in the [`ScopeGuard`]:
+///
/// ```
/// # use kernel::types::ScopeGuard;
/// fn example3(arg: bool) -> Result {