From af85f552b676d66ed0e9ae0d401cd0c4ffbbeb21 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Fri, 16 Dec 2022 13:09:12 +0900 Subject: [PATCH] cli: do not unwrap BackendError at resolve_revset() --- src/cli_util.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cli_util.rs b/src/cli_util.rs index 04440aa01..29c4cd70e 100644 --- a/src/cli_util.rs +++ b/src/cli_util.rs @@ -635,11 +635,7 @@ impl WorkspaceCommandHelper { pub fn resolve_revset(&self, revision_str: &str) -> Result, 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(