Skip to content

Commit 8e2d9e8

Browse files
authored
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 <[email protected]>
1 parent 021d07b commit 8e2d9e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/desc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ mod tests {
257257
.expect(format!("expected error for {}", name).as_ref());
258258
match res {
259259
Error::Msg(msg) => assert_eq!(msg, format!("'{}' is not a valid label name", name)),
260-
other => panic!(other),
260+
other => panic!("{}", other),
261261
};
262262
}
263263
}
@@ -272,7 +272,7 @@ mod tests {
272272
.expect(format!("expected error for {}", name).as_ref());
273273
match res {
274274
Error::Msg(msg) => assert_eq!(msg, format!("'{}' is not a valid label name", name)),
275-
other => panic!(other),
275+
other => panic!("{}", other),
276276
};
277277
}
278278
}
@@ -287,7 +287,7 @@ mod tests {
287287
Error::Msg(msg) => {
288288
assert_eq!(msg, format!("'{}' is not a valid metric name", name))
289289
}
290-
other => panic!(other),
290+
other => panic!("{}", other),
291291
};
292292
}
293293
}

0 commit comments

Comments
 (0)