Use drop instead of the toilet closure |_| ()

This commit is contained in:
Lzu Tao
2020-01-02 08:56:12 +00:00
parent 5095101528
commit dd8f072233
25 changed files with 35 additions and 35 deletions

View File

@@ -814,7 +814,7 @@ impl File {
use crate::convert::TryInto;
let size: off64_t =
size.try_into().map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))?;
cvt_r(|| unsafe { ftruncate64(self.0.raw(), size) }).map(|_| ())
cvt_r(|| unsafe { ftruncate64(self.0.raw(), size) }).map(drop)
}
}