Skip to content

Commit a719333

Browse files
committed
fix unused function warnings on some feature combinations
Signed-off-by: Patrick Roy <[email protected]>
1 parent af85b10 commit a719333

File tree

3 files changed

+2
-132
lines changed

3 files changed

+2
-132
lines changed

.buildkite/README.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

.buildkite/rust-vmm-ci-tests.json

Lines changed: 0 additions & 112 deletions
This file was deleted.

vhost/src/vhost_user/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
//! Most messages that can be sent via the Unix domain socket implementing vhost-user have an
1919
//! equivalent ioctl to the kernel implementation.
2020
21-
use std::fs::File;
2221
use std::io::Error as IOError;
2322

2423
pub mod message;
@@ -214,7 +213,8 @@ pub type HandlerResult<T> = std::result::Result<T, IOError>;
214213

215214
/// Utility function to take the first element from option of a vector of files.
216215
/// Returns `None` if the vector contains no file or more than one file.
217-
pub(crate) fn take_single_file(files: Option<Vec<File>>) -> Option<File> {
216+
#[cfg(any(feature = "vhost-user-backend", feature = "vhost-user-frontend"))]
217+
pub(crate) fn take_single_file(files: Option<Vec<std::fs::File>>) -> Option<std::fs::File> {
218218
let mut files = files?;
219219
if files.len() != 1 {
220220
return None;

0 commit comments

Comments
 (0)