rust/rhg/src/commands/files.rs
changeset 48342 10c32e1b892a
parent 48174 9ecf802b06e0
child 48409 005ae1a343f8
--- a/rust/rhg/src/commands/files.rs	Fri Nov 19 17:34:48 2021 +0100
+++ b/rust/rhg/src/commands/files.rs	Tue Nov 23 18:27:42 2021 +0100
@@ -3,6 +3,7 @@
 use crate::ui::UiError;
 use crate::utils::path_utils::relativize_paths;
 use clap::Arg;
+use hg::errors::HgError;
 use hg::operations::list_rev_tracked_files;
 use hg::operations::Dirstate;
 use hg::repo::Repo;
@@ -45,14 +46,14 @@
     } else {
         let distate = Dirstate::new(repo)?;
         let files = distate.tracked_files()?;
-        display_files(invocation.ui, repo, files)
+        display_files(invocation.ui, repo, files.into_iter().map(Ok))
     }
 }
 
 fn display_files<'a>(
     ui: &Ui,
     repo: &Repo,
-    files: impl IntoIterator<Item = &'a HgPath>,
+    files: impl IntoIterator<Item = Result<&'a HgPath, HgError>>,
 ) -> Result<(), CommandError> {
     let mut stdout = ui.stdout_buffer();
     let mut any = false;