Suppress warning for unused_mut in rbpf-cli (#31281)

This commit is contained in:
Pankaj Garg 2023-04-20 06:06:31 -07:00 committed by GitHub
parent 9629ef3095
commit e1de4c0429
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -245,6 +245,8 @@ before execting it in the virtual machine.",
file.rewind().unwrap();
let mut contents = Vec::new();
file.read_to_end(&mut contents).unwrap();
// Allowing mut here, since it is needed for jit compile, which is under a config flag
#[allow(unused_mut)]
let mut verified_executable = if magic == [0x7f, 0x45, 0x4c, 0x46] {
let mut load_program_metrics = LoadProgramMetrics::default();
let result = load_program_from_bytes(