summaryrefslogtreecommitdiff
path: root/src/index.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-03-27 11:14:38 +0200
committerLars Wirzenius <liw@liw.fi>2021-03-27 11:14:38 +0200
commit939433798b708d986928a124e81dd03c8488ad90 (patch)
treeb6f1fde5f227c4ddef21838fa3d8b6f56be88b43 /src/index.rs
parent0483cfcc6f85711b7b75fc8f0182e4baf7c0019f (diff)
downloadobnam2-939433798b708d986928a124e81dd03c8488ad90.tar.gz
refactor: drop unnecessary conversions to the same type
Diffstat (limited to 'src/index.rs')
-rw-r--r--src/index.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index.rs b/src/index.rs
index c8d8d86..6628b50 100644
--- a/src/index.rs
+++ b/src/index.rs
@@ -214,12 +214,12 @@ mod sql {
} else {
let err = IndexError::DuplicateChunk(id.clone());
error!("{}", err);
- return Err(err.into());
+ return Err(err);
}
}
if metas.len() == 0 {
eprintln!("lookup: no hits");
- return Err(IndexError::MissingChunk(id.clone()).into());
+ return Err(IndexError::MissingChunk(id.clone()));
}
let r = metas[0].clone();
Ok(r)