Mercurial > public > mercurial-scm > hg
diff rust/rhg/src/ui.rs @ 45440:a6a000ab135b
rhg: print error message when argument parsing fails
Differential Revision: https://phab.mercurial-scm.org/D8956
author | Antoine Cezar <antoine.cezar@octobus.net> |
---|---|
date | Mon, 17 Aug 2020 16:55:43 +0200 |
parents | fbc373b7cbc3 |
children | 66756b34c06e |
line wrap: on
line diff
--- a/rust/rhg/src/ui.rs Thu Aug 13 16:36:42 2020 +0200 +++ b/rust/rhg/src/ui.rs Mon Aug 17 16:55:43 2020 +0200 @@ -47,6 +47,11 @@ stderr.flush().or_else(handle_stderr_error) } + + /// Write string line to stderr + pub fn writeln_stderr_str(&self, s: &str) -> Result<(), UiError> { + self.write_stderr(&format!("{}\n", s).as_bytes()) + } } /// A buffered stdout writer for faster batch printing operations.