diff rust/rhg/src/error.rs @ 46499:eace48b4a786

rust: Use the DisplayBytes trait in config printing This is similar to `std::fmt::Display`, but for arbitrary bytes instead of Unicode. Writing to an abstract output stream helps avoid allocating intermediate `Vec<u8>` buffers. Differential Revision: https://phab.mercurial-scm.org/D9966
author Simon Sapin <simon.sapin@octobus.net>
date Mon, 08 Feb 2021 11:13:56 +0100
parents d7685105e504
children d8730ff51d5a
line wrap: on
line diff
--- a/rust/rhg/src/error.rs	Thu Feb 04 13:32:11 2021 -0800
+++ b/rust/rhg/src/error.rs	Mon Feb 08 11:13:56 2021 +0100
@@ -90,7 +90,7 @@
         CommandError::Abort {
             message: format_bytes!(
                 b"config parse error in {}{}: '{}'",
-                origin.to_bytes(),
+                origin,
                 line_message,
                 bytes
             ),