Skip to content

Commit 37146b5

Browse files
decayskorobogatydmitry
authored andcommitted
remove redundant change
1 parent 0048775 commit 37146b5

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

tests/integration_test.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn attach_a_backing_file_with_sizelimit_overflow() {
5858
fn attach_a_backing_file(offset: u64, sizelimit: u64, file_size: i64) {
5959
let _lock = setup();
6060

61-
let (mut devices, ld0_path, file_path) = {
61+
let (devices, ld0_path, file_path) = {
6262
let lc = LoopControl::open().expect("should be able to open the LoopControl device");
6363

6464
let file = create_backing_file(file_size);
@@ -84,26 +84,23 @@ fn attach_a_backing_file(offset: u64, sizelimit: u64, file_size: i64) {
8484
1,
8585
"there should be only one loopback mounted device"
8686
);
87-
88-
let device = devices.pop().unwrap();
89-
9087
assert_eq!(
91-
device.name.as_str(),
88+
devices[0].name.as_str(),
9289
ld0_path.to_str().unwrap(),
9390
"the attached devices name should match the input name"
9491
);
9592
assert_eq!(
96-
device.back_file.clone().unwrap().as_str(),
93+
devices[0].back_file.clone().unwrap().as_str(),
9794
file_path.to_str().unwrap(),
9895
"the backing file should match the given file"
9996
);
10097
assert_eq!(
101-
device.offset,
98+
devices[0].offset,
10299
Some(offset),
103100
"the offset should match the requested offset"
104101
);
105102
assert_eq!(
106-
device.size_limit,
103+
devices[0].size_limit,
107104
Some(sizelimit),
108105
"the sizelimit should match the requested sizelimit"
109106
);

0 commit comments

Comments
 (0)