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:
Dorinda Bassey 2025-11-13 14:17:51 +01:00 committed by Stefano Garzarella
parent 736c5d109d
commit dff8efdd2b
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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);
}
}