From: Matt Corallo Date: Wed, 31 Mar 2021 03:21:00 +0000 (-0400) Subject: Fix two new compiler warnings in fuzz X-Git-Tag: v0.0.14~41^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=refs%2Fheads%2F2021-03-fix-warns;p=rust-lightning Fix two new compiler warnings in fuzz This fixes two trivial compiler warnings in fuzz that point to broken usage of explicit `panic!()`s. --- diff --git a/fuzz/src/chanmon_consistency.rs b/fuzz/src/chanmon_consistency.rs index 7c5875ac1..e7cd99008 100644 --- a/fuzz/src/chanmon_consistency.rs +++ b/fuzz/src/chanmon_consistency.rs @@ -234,7 +234,7 @@ fn check_api_err(api_err: APIError) { _ if err.starts_with("Cannot send value that would put our balance under counterparty-announced channel reserve value") => {}, _ if err.starts_with("Cannot send value that would overdraw remaining funds.") => {}, _ if err.starts_with("Cannot send value that would not leave enough to pay for fees.") => {}, - _ => panic!(err), + _ => panic!("{}", err), } }, APIError::MonitorUpdateFailed => { diff --git a/fuzz/src/router.rs b/fuzz/src/router.rs index e93618ca7..fb720c991 100644 --- a/fuzz/src/router.rs +++ b/fuzz/src/router.rs @@ -130,7 +130,7 @@ pub fn do_test(data: &[u8], out: Out) { msgs::DecodeError::InvalidValue => return, msgs::DecodeError::BadLengthDescriptor => return, msgs::DecodeError::ShortRead => panic!("We picked the length..."), - msgs::DecodeError::Io(e) => panic!(format!("{:?}", e)), + msgs::DecodeError::Io(e) => panic!("{:?}", e), } } }}