mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-21 23:41:15 +00:00
acpi_tables: sdt: Implement Std::is_empty()
This allows the removal of [allow(clippy::len_without_is_empty)] Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
683d116416
commit
1b314cff5b
@ -38,7 +38,6 @@ pub struct Sdt {
|
|||||||
data: Vec<u8>,
|
data: Vec<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::len_without_is_empty)]
|
|
||||||
impl Sdt {
|
impl Sdt {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
signature: [u8; 4],
|
signature: [u8; 4],
|
||||||
@ -124,6 +123,10 @@ impl Sdt {
|
|||||||
pub fn len(&self) -> usize {
|
pub fn len(&self) -> usize {
|
||||||
self.data.len()
|
self.data.len()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_empty(&self) -> bool {
|
||||||
|
self.data.is_empty()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
Loading…
Reference in New Issue
Block a user