mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2025-12-26 06:32:44 +00:00
vhost-device-gpu: Fix format and lint issues
These are minor formatting and linter fixes Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
This commit is contained in:
parent
736c5d109d
commit
dff8efdd2b
@ -257,9 +257,10 @@ pub fn start_backend(socket_path: &Path, config: GpuConfig) -> Result<(), StartE
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use assert_matches::assert_matches;
|
||||
use std::path::Path;
|
||||
|
||||
use assert_matches::assert_matches;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
@ -343,7 +344,7 @@ mod tests {
|
||||
fn test_capset_display_multiple() {
|
||||
let capset = GpuCapset::VIRGL | GpuCapset::VIRGL2;
|
||||
let output = capset.to_string();
|
||||
assert_eq!(output, "virgl, virgl2")
|
||||
assert_eq!(output, "virgl, virgl2");
|
||||
}
|
||||
|
||||
/// Check if display name of GpuMode is the same as the name in the CLI arg
|
||||
|
||||
@ -173,9 +173,9 @@ mod tests {
|
||||
}
|
||||
|
||||
// Convert each CapsetName into GpuCapset
|
||||
for capset_name in CapsetName::value_variants().iter().cloned() {
|
||||
for capset_name in CapsetName::value_variants().iter().copied() {
|
||||
let resulting_capset: GpuCapset = capset_name.into(); // Would panic! if the definition is incorrect
|
||||
assert_eq!(resulting_capset.bits(), capset_name as u64)
|
||||
assert_eq!(resulting_capset.bits(), capset_name as u64);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user