Skip to content

Commit ad037b4

Browse files
committed
style: cargo fmt
Reformat lines left non-canonical by earlier edits (a clippy one-liner, a struct literal that now fits one line) and a stale import order in the basic test. Formatting only, no behavior change. Signed-off-by: Ming Lei <tom.leiming@gmail.com>
1 parent 53c3ef5 commit ad037b4

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/dev.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2935,7 +2935,9 @@ impl<T: Qcow2IoOps> Qcow2Dev<T> {
29352935
/// Prepare everything(loading l1/refcount table) for handling any qcow2 IO
29362936
#[async_recursion(?Send)]
29372937
pub async fn qcow2_prep_io(&self) -> Qcow2Result<()> {
2938-
if let Some(back) = &self.backing_file { back.qcow2_prep_io().await? };
2938+
if let Some(back) = &self.backing_file {
2939+
back.qcow2_prep_io().await?
2940+
};
29392941
self.__qcow2_prep_io().await
29402942
}
29412943
}

src/sync_io.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ impl Qcow2IoSync {
2121
crate::ops::set_direct_io(fd);
2222
}
2323

24-
Qcow2IoSync {
25-
_file: file,
26-
fd,
27-
}
24+
Qcow2IoSync { _file: file, fd }
2825
}
2926

3027
#[inline(always)]

tests/basic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ mod common;
44
mod integretion {
55
use crate::common::*;
66
use crypto_hash::{hex_digest, Algorithm};
7+
use hex;
78
use qcow2_rs::dev::*;
89
use qcow2_rs::helpers::Qcow2IoBuf;
910
use qcow2_rs::qcow2_default_params;
@@ -13,7 +14,6 @@ mod integretion {
1314
use std::path::PathBuf;
1415
use std::time::Instant;
1516
use tokio::runtime::Runtime;
16-
use hex;
1717

1818
#[test]
1919
fn test_qcow2_parsing() {

0 commit comments

Comments
 (0)