Skip to content

Commit 7f6c048

Browse files
ShadowCurseJackThomson2
authored andcommitted
cleanup: remove redundant std::result::Result imports
No functional change. Just cleanup. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
1 parent c0afd2b commit 7f6c048

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/vmm/src/utils/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use std::fs::{File, OpenOptions};
1414
use std::num::Wrapping;
1515
use std::os::unix::fs::OpenOptionsExt;
1616
use std::path::Path;
17-
use std::result::Result;
1817

1918
use libc::O_NONBLOCK;
2019

@@ -78,8 +77,8 @@ pub const fn align_down(addr: u64, align: u64) -> u64 {
7877

7978
/// Create and open a file for both reading and writing to it with a O_NONBLOCK flag.
8079
/// In case we open a FIFO, we need all READ, WRITE and O_NONBLOCK in order to not block the process
81-
/// if nobody is consuming the message. Otherwise openning the FIFO with only WRITE and O_NONBLOCK
82-
/// will fail if there is no readear already attached to it.
80+
/// if nobody is consuming the message. Otherwise opening the FIFO with only WRITE and O_NONBLOCK
81+
/// will fail with ENXIO if there is no readier already attached to it.
8382
/// NOTE: writing to a pipe will start failing when reaching 64K of unconsumed content.
8483
pub fn open_file_nonblock(path: &Path) -> Result<File, std::io::Error> {
8584
OpenOptions::new()

src/vmm/src/vstate/interrupts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ impl<'a> Persist<'a> for MsixVectorGroup {
187187
fn restore(
188188
constructor_args: Self::ConstructorArgs,
189189
state: &Self::State,
190-
) -> std::result::Result<Self, Self::Error> {
190+
) -> Result<Self, Self::Error> {
191191
let mut vectors = Vec::with_capacity(state.len());
192192

193193
for gsi in state {

0 commit comments

Comments
 (0)