mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-23 18:14:04 +08:00
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 <kernel@valentinobst.de> Reviewed-by: Trevor Gross <tmgross@umich.edu> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20240131-doc-fixes-v3-v3-9-0c8af94ed7de@valentinobst.de Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
parent
af8b18d740
commit
6269fadf35
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user