mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
selftests/bpf: Format data_in_arena_rust.rs with rustfmt
'make rustfmtcheck' checks every .rs file in the tree and fails since
the test in Rust was added:
Diff in tools/testing/selftests/bpf/progs/data_in_arena_rust.rs:42:
#[no_mangle]
static IN_RODATA: Node = Node { val: 3, next: None };
#[no_mangle]
-static mut IN_DATA: Node = Node { val: 20, next: Some(&IN_RODATA) };
+static mut IN_DATA: Node = Node {
+ val: 20,
+ next: Some(&IN_RODATA),
+};
Format the file with rustfmt. The code and the data of the program
don't change.
Fixes: e86cb73154 ("selftests/bpf: Add test for global data of a program in Rust")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20261003203326.1086454-1-alexei.starovoitov@gmail.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
This commit is contained in:
parent
1ad83c31ab
commit
99dc1ba542
|
|
@ -42,7 +42,10 @@ pub struct Node {
|
|||
#[no_mangle]
|
||||
static IN_RODATA: Node = Node { val: 3, next: None };
|
||||
#[no_mangle]
|
||||
static mut IN_DATA: Node = Node { val: 20, next: Some(&IN_RODATA) };
|
||||
static mut IN_DATA: Node = Node {
|
||||
val: 20,
|
||||
next: Some(&IN_RODATA),
|
||||
};
|
||||
#[no_mangle]
|
||||
static mut IN_BSS: Node = Node { val: 0, next: None };
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user