changeset 46619:f2fc34e88238

copies-rust: remove an unnecessary format!() inside assert!() The `assert!()` macro supports formatting. Rust 2021 no longer supports an unnecessary `format!()` inside it. I noticed because I recently update my Rust toolchain and `test-check-cargo-lock.t` started failing. Differential Revision: https://phab.mercurial-scm.org/D10085
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 01 Mar 2021 14:44:29 -0800
parents dde86beca388
children 7621ab4005bf
files rust/hg-core/src/copy_tracing.rs
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/copy_tracing.rs	Mon Mar 01 20:08:26 2021 +0100
+++ b/rust/hg-core/src/copy_tracing.rs	Mon Mar 01 14:44:29 2021 -0800
@@ -357,7 +357,7 @@
     }
 
     fn untokenize(&self, token: PathToken) -> &HgPathBuf {
-        assert!(token < self.path.len(), format!("Unknown token: {}", token));
+        assert!(token < self.path.len(), "Unknown token: {}", token);
         &self.path[token]
     }
 }