Skip to content

Commit

Permalink
Fix compiler warning in documentation example
Browse files Browse the repository at this point in the history
Add format string to panic!() when handling Options parse() result
to avoid compiler warning.
  • Loading branch information
n1000 committed Sep 18, 2021
1 parent c11eb65 commit ba5d54a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
//! opts.optflag("h", "help", "print this help menu");
//! let matches = match opts.parse(&args[1..]) {
//! Ok(m) => { m }
//! Err(f) => { panic!(f.to_string()) }
//! Err(f) => { panic!("{}", f.to_string()) }
//! };
//! if matches.opt_present("h") {
//! print_usage(&program, opts);
Expand Down

0 comments on commit ba5d54a

Please sign in to comment.