Skip to content

Commit 607657b

Browse files
authored
Merge pull request #60 from skorobogatydmitry/sd/small-code-enhancement
Remove unused local variable: make construction inline
2 parents c4b37f5 + c6fe9e1 commit 607657b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,7 @@ impl LoopDevice {
236236
/// for further details) or when calling the ioctl to attach the backing
237237
/// file to the device.
238238
pub fn attach_file<P: AsRef<Path>>(&self, backing_file: P) -> io::Result<()> {
239-
let info = loop_info64 {
240-
..Default::default()
241-
};
242-
243-
Self::attach_with_loop_info(self, backing_file, info)
239+
Self::attach_with_loop_info(self, backing_file, loop_info64::default())
244240
}
245241

246242
/// Attach the loop device to a file with `loop_info64`.

0 commit comments

Comments
 (0)