# HG changeset patch # User Simon Sapin # Date 2021-05-19 13:10:49 # Node ID 21e9ff96a811b9acb7548a1738530eb61fb09c52 # Parent ebf84336a0eb3c32fc8461268a2e04a53a50757f 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 diff --git a/rust/hg-core/tests/test_missing_ancestors.rs b/rust/hg-core/tests/test_missing_ancestors.rs --- a/rust/hg-core/tests/test_missing_ancestors.rs +++ b/rust/hg-core/tests/test_missing_ancestors.rs @@ -156,7 +156,7 @@ impl<'a> NaiveMissingAncestors<'a> { if left == right { return; } - panic!(format!( + panic!( "Equality assertion failed (left != right) left={:?} right={:?} @@ -171,7 +171,7 @@ impl<'a> NaiveMissingAncestors<'a> { self.bases, self.history, self.random_seed, - )); + ); } } @@ -231,7 +231,7 @@ fn parse_test_missing_ancestors_params(v .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]) }