cli: do not unwrap BackendError at resolve_revset()

This commit is contained in:
Yuya Nishihara 2022-12-16 13:09:12 +09:00
parent 4e8f51a983
commit af85f552b6

View file

@ -635,11 +635,7 @@ impl WorkspaceCommandHelper {
pub fn resolve_revset(&self, revision_str: &str) -> Result<Vec<Commit>, CommandError> {
let revset_expression = self.parse_revset(revision_str)?;
let revset = self.evaluate_revset(&revset_expression)?;
Ok(revset
.iter()
.commits(self.repo.store())
.map(Result::unwrap)
.collect())
Ok(revset.iter().commits(self.repo.store()).try_collect()?)
}
pub fn parse_revset(