Skip to content

Commit ba5d54a

Browse files
committed
Fix compiler warning in documentation example
Add format string to panic!() when handling Options parse() result to avoid compiler warning.
1 parent c11eb65 commit ba5d54a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
//! opts.optflag("h", "help", "print this help menu");
7878
//! let matches = match opts.parse(&args[1..]) {
7979
//! Ok(m) => { m }
80-
//! Err(f) => { panic!(f.to_string()) }
80+
//! Err(f) => { panic!("{}", f.to_string()) }
8181
//! };
8282
//! if matches.opt_present("h") {
8383
//! print_usage(&program, opts);

0 commit comments

Comments
 (0)