Skip to content

Commit af56c22

Browse files
author
decay
committed
rollback redundant change
1 parent c937dc5 commit af56c22

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tests/integration_test.rs

Lines changed: 5 additions & 7 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);
@@ -85,25 +85,23 @@ fn attach_a_backing_file(offset: u64, sizelimit: u64, file_size: i64) {
8585
"there should be only one loopback mounted device"
8686
);
8787

88-
let device = devices.pop().unwrap();
89-
9088
assert_eq!(
91-
device.name.as_str(),
89+
devices[0].name.as_str(),
9290
ld0_path.to_str().unwrap(),
9391
"the attached devices name should match the input name"
9492
);
9593
assert_eq!(
96-
device.back_file.clone().unwrap().as_str(),
94+
devices[0].back_file.clone().unwrap().as_str(),
9795
file_path.to_str().unwrap(),
9896
"the backing file should match the given file"
9997
);
10098
assert_eq!(
101-
device.offset,
99+
devices[0].offset,
102100
Some(offset),
103101
"the offset should match the requested offset"
104102
);
105103
assert_eq!(
106-
device.size_limit,
104+
devices[0].size_limit,
107105
Some(sizelimit),
108106
"the sizelimit should match the requested sizelimit"
109107
);

0 commit comments

Comments
 (0)