From 8e2d9e813948f2e249716d984ed1a1e06c17f0ea Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Fri, 19 Feb 2021 12:58:37 +0000 Subject: [PATCH] desc: fix format string for panic (#391) This fixes a compile error on current beta toolchain, which started enforcing that panic messages must be string literals (with format specifiers). Signed-off-by: Luca BRUNO --- src/desc.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/desc.rs b/src/desc.rs index e5c0f9a0..70280863 100644 --- a/src/desc.rs +++ b/src/desc.rs @@ -257,7 +257,7 @@ mod tests { .expect(format!("expected error for {}", name).as_ref()); match res { Error::Msg(msg) => assert_eq!(msg, format!("'{}' is not a valid label name", name)), - other => panic!(other), + other => panic!("{}", other), }; } } @@ -272,7 +272,7 @@ mod tests { .expect(format!("expected error for {}", name).as_ref()); match res { Error::Msg(msg) => assert_eq!(msg, format!("'{}' is not a valid label name", name)), - other => panic!(other), + other => panic!("{}", other), }; } } @@ -287,7 +287,7 @@ mod tests { Error::Msg(msg) => { assert_eq!(msg, format!("'{}' is not a valid metric name", name)) } - other => panic!(other), + other => panic!("{}", other), }; } }