Skip to content

Commit 19dd092

Browse files
albankurtiintel-lab-lkp
authored andcommitted
rust: samples: add missing newline to pr_info! calls in rust_print_main
Fixes: f431c5c ("samples: rust: print: Add sample code for Arc printing") Reported-by: Miguel Ojeda <[email protected]> Closes: Rust-for-Linux#1139 Signed-off-by: Alban Kurti <[email protected]>
1 parent b443265 commit 19dd092

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

samples/rust/rust_print_main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ fn arc_print() -> Result {
2323
let b = UniqueArc::new("hello, world", GFP_KERNEL)?;
2424

2525
// Prints the value of data in `a`.
26-
pr_info!("{}", a);
26+
pr_info!("{}\n", a);
2727

2828
// Uses ":?" to print debug fmt of `b`.
29-
pr_info!("{:?}", b);
29+
pr_info!("{:?}\n", b);
3030

3131
let a: Arc<&str> = b.into();
3232
let c = a.clone();
@@ -53,7 +53,7 @@ fn arc_print() -> Result {
5353
}
5454

5555
// Pretty-prints the debug formatting with lower-case hexadecimal integers.
56-
pr_info!("{:#x?}", a);
56+
pr_info!("{:#x?}\n", a);
5757

5858
Ok(())
5959
}

0 commit comments

Comments
 (0)