clippy: remove unnecessary closures

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2021-01-15 15:21:34 +01:00
parent 4428818412
commit 22a9189ee0
10 changed files with 19 additions and 20 deletions

View File

@ -60,7 +60,7 @@ impl FixedIndexReader {
pub fn open(path: &Path) -> Result<Self, Error> {
File::open(path)
.map_err(Error::from)
.and_then(|file| Self::new(file))
.and_then(Self::new)
.map_err(|err| format_err!("Unable to open fixed index {:?} - {}", path, err))
}