From 477b809cdef14b7bfec43ca600e8926e7822c507 Mon Sep 17 00:00:00 2001 From: Ermal Kaleci Date: Fri, 29 Sep 2023 10:55:58 +0200 Subject: [PATCH] fix error msg --- src/extensions/api/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extensions/api/mod.rs b/src/extensions/api/mod.rs index 2c02eca..ea0751b 100644 --- a/src/extensions/api/mod.rs +++ b/src/extensions/api/mod.rs @@ -61,12 +61,12 @@ pub(crate) fn validate_new_head( ) -> anyhow::Result<()> { if let Some((current_hash, current_number)) = tx.borrow().as_ref() { if *current_number > number { - return Err(anyhow::Error::msg("Head number is not increasing, current_number: {current_number} new_number: {number}")); + return Err(anyhow::Error::msg(format!("Head number is not increasing, current_number: {current_number} new_number: {number}"))); } if *current_number == number && current_hash != hash { return Err(anyhow::Error::msg( - "Head number is the same but hash is not matching, current_hash: {current_hash} new_hash: {hash}" + format!("Head number is the same but hash is not matching, current_hash: {current_hash} new_hash: {hash}") )); } }