Browse Source

test: Update to use non-mut map types

Tatsuyuki Ishi 3 years ago
parent
commit
e852f7e0cc
1 changed files with 3 additions and 3 deletions
  1. 3 3
      test/cases/020_elf/000_maps/map_test.ebpf.rs

+ 3 - 3
test/cases/020_elf/000_maps/map_test.ebpf.rs

@@ -14,10 +14,10 @@ use aya_bpf::{
 };
 
 #[map]
-static mut FOO: Array<u32> = Array::<u32>::with_max_entries(10, 0);
+static FOO: Array<u32> = Array::<u32>::with_max_entries(10, 0);
 
 #[map(name = "BAR")]
-static mut BAZ: Array<u32> = Array::<u32>::with_max_entries(10, 0);
+static BAZ: Array<u32> = Array::<u32>::with_max_entries(10, 0);
 
 #[xdp]
 pub fn pass(ctx: XdpContext) -> u32 {
@@ -34,4 +34,4 @@ unsafe fn try_pass(_ctx: XdpContext) -> Result<u32, u32> {
 #[panic_handler]
 fn panic(_info: &core::panic::PanicInfo) -> ! {
     unsafe { core::hint::unreachable_unchecked() }
-}
+}