From d015ff250e1bb3e6237e27a179e47b929df8642d Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 30 Mar 2021 23:21:00 -0400 Subject: [PATCH] Fix two new compiler warnings in fuzz This fixes two trivial compiler warnings in fuzz that point to broken usage of explicit `panic!()`s. --- fuzz/src/chanmon_consistency.rs | 2 +- fuzz/src/router.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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), } } }} -- 2.39.5