Mercurial > public > mercurial-scm > hg
diff rust/rhg/src/ui.rs @ 48730:1aaf11e35aec
rhg: Pass a &Config to Ui::new
When a Ui object is needed to print errors about configuration-loading errors,
an empty (default) configuration is used.
Differential Revision: https://phab.mercurial-scm.org/D12164
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Thu, 10 Feb 2022 12:12:56 +0100 |
parents | 99b1dfc06571 |
children | f591b377375f |
line wrap: on
line diff
--- a/rust/rhg/src/ui.rs Thu Feb 10 11:58:04 2022 +0100 +++ b/rust/rhg/src/ui.rs Thu Feb 10 12:12:56 2022 +0100 @@ -1,4 +1,5 @@ use format_bytes::format_bytes; +use hg::config::Config; use hg::utils::files::get_bytes_from_os_string; use std::borrow::Cow; use std::env; @@ -21,7 +22,7 @@ /// The commandline user interface impl Ui { - pub fn new() -> Self { + pub fn new(_config: &Config) -> Self { Ui { stdout: std::io::stdout(), stderr: std::io::stderr(),