changeset 47288:16b48ebf656e

rust: Fix "panic message is not a string literal" warnings These deprecation warnings would not become errors until we actively port crates to the (not yet released) Rust 2021 edition, but fixing them anyway reduces console output noise. Differential Revision: https://phab.mercurial-scm.org/D10743
author Simon Sapin <simon.sapin@octobus.net>
date Wed, 19 May 2021 15:10:49 +0200
parents 402bd66cbdf2
children 33c0c25d0b0f
files rust/hg-core/tests/test_missing_ancestors.rs
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/tests/test_missing_ancestors.rs	Wed May 19 15:08:27 2021 +0200
+++ b/rust/hg-core/tests/test_missing_ancestors.rs	Wed May 19 15:10:49 2021 +0200
@@ -156,7 +156,7 @@
         if left == right {
             return;
         }
-        panic!(format!(
+        panic!(
             "Equality assertion failed (left != right)
                 left={:?}
                 right={:?}
@@ -171,7 +171,7 @@
             self.bases,
             self.history,
             self.random_seed,
-        ));
+        );
     }
 }
 
@@ -231,7 +231,7 @@
         .map(|n| n.trim().parse().expect(err_msg))
         .collect();
     if params.len() != 3 {
-        panic!(err_msg);
+        panic!("{}", err_msg);
     }
     (params[0], params[1], params[2])
 }