From e8430eaf2145db2b34ab6e4619dda6c1260b503f Mon Sep 17 00:00:00 2001 From: decay Date: Fri, 11 Jul 2025 10:46:03 +0400 Subject: [PATCH] remove unused local variable: make construction inline --- src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 0d2d463..16a5cff 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -236,11 +236,7 @@ impl LoopDevice { /// for further details) or when calling the ioctl to attach the backing /// file to the device. pub fn attach_file>(&self, backing_file: P) -> io::Result<()> { - let info = loop_info64 { - ..Default::default() - }; - - Self::attach_with_loop_info(self, backing_file, info) + Self::attach_with_loop_info(self, backing_file, loop_info64::default()) } /// Attach the loop device to a file with `loop_info64`.