runtime-rs: fix warning

Module anyhow::anyhow is only used on x86_64 architecture in
crates/hypervisor/src/device/vfio.rs file.

Fixes: #4676

Signed-off-by: xuejun-xj <jiyunxue@alibaba.linux.com>
This commit is contained in:
xuejun-xj 2022-07-18 09:34:06 +08:00
parent 2b01e9ba40
commit 545ae3f0ee

View File

@ -6,7 +6,9 @@
use std::{fs, path::Path, process::Command};
use anyhow::{anyhow, Context, Result};
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
use anyhow::anyhow;
use anyhow::{Context, Result};
fn override_driver(bdf: &str, driver: &str) -> Result<()> {
let driver_override = format!("/sys/bus/pci/devices/{}/driver_override", bdf);