media: ffmpeg: Replace #[allow(dead_code)] with underscore prefix.

It's slightly less verbose and more idiomatic to do it this way.

BUG=None
TEST=cargo build

Change-Id: I1f67f88543b5e65cb187406179e463b9182fade5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3809196
Commit-Queue: Tatsuyuki Ishi <ishitatsuyuki@google.com>
Tested-by: Tatsuyuki Ishi <ishitatsuyuki@google.com>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
This commit is contained in:
Tatsuyuki Ishi 2022-08-03 12:49:46 +09:00 committed by crosvm LUCI
parent 56239c7efe
commit 8fd1ec600d

View file

@ -367,8 +367,7 @@ pub struct AvPacket<'a> {
packet: ffi::AVPacket,
/// This is just used to drop the `AvBuffer` if needed upon destruction and is not referenced
/// otherwise.
#[allow(dead_code)]
ownership: AvPacketOwnership<'a>,
_ownership: AvPacketOwnership<'a>,
}
#[derive(Debug, ThisError)]
@ -395,7 +394,7 @@ impl<'a> AvPacket<'a> {
// Safe because all the other elements of this struct can be zeroed.
..unsafe { std::mem::zeroed() }
},
ownership: AvPacketOwnership::Borrowed(PhantomData),
_ownership: AvPacketOwnership::Borrowed(PhantomData),
}
}
@ -422,7 +421,7 @@ impl<'a> AvPacket<'a> {
// Safe because all the other elements of this struct can be zeroed.
..unsafe { std::mem::zeroed() }
},
ownership: AvPacketOwnership::Owned(av_buffer),
_ownership: AvPacketOwnership::Owned(av_buffer),
};
Ok(ret)