qcow_img: Fix warning message.

warning: panic message is not a string literal
  --> qcow_utils/src/qcow_img.rs:52:26
   |
52 |         Err(f) => panic!(f.to_string()),
   |                          ^^^^^^^^^^^^^
   |
   = note: `#[warn(non_fmt_panic)]` on by default
   = note: this is no longer accepted in Rust 2021
help: add a "{}" format string to Display the message
   |
52 |         Err(f) => panic!("{}", f.to_string()),
   |                          ^^^^^
help: or use std::panic::panic_any instead
   |
52 |         Err(f) => std::panic::panic_any(f.to_string()),
   |                   ^^^^^^^^^^^^^^^^^^^^^^

warning: 1 warning emitted

BUG=None
TEST=build

Change-Id: I06a18610b455e57c9c9813513963385749fad17c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3026651
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Junichi Uekawa 2021-07-14 18:39:24 +09:00 committed by Commit Bot
parent 227beb25c9
commit f8fff1c5bf

View file

@ -49,7 +49,7 @@ fn main() -> std::result::Result<(), ()> {
let matches = match opts.parse(&args[1..]) {
Ok(m) => m,
Err(f) => panic!(f.to_string()),
Err(f) => panic!("{}", f.to_string()),
};
if matches.free.len() < 2 {