From f84bbd7e3b105d2aa607b83864cdb5ccafbd73aa Mon Sep 17 00:00:00 2001 From: BiancaIalangi Date: Thu, 12 Dec 2024 15:21:54 +0200 Subject: [PATCH] code report - show diff size in report --- framework/meta/src/cmd/code_report/compare.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/framework/meta/src/cmd/code_report/compare.rs b/framework/meta/src/cmd/code_report/compare.rs index 28c604962d..98f64c7738 100644 --- a/framework/meta/src/cmd/code_report/compare.rs +++ b/framework/meta/src/cmd/code_report/compare.rs @@ -1,10 +1,20 @@ pub(crate) fn size_status_after_comparing(size: usize, compared_size: usize) -> String { match size.cmp(&compared_size) { std::cmp::Ordering::Greater => { - format!("{} :arrow_right: {} :red_circle:", compared_size, size) + format!( + "{} :arrow_right: {} :red_circle: (+{})", + compared_size, + size, + size - compared_size + ) }, std::cmp::Ordering::Less => { - format!("{} :arrow_right: {} :green_circle:", compared_size, size) + format!( + "{} :arrow_right: {} :green_circle: (-{})", + compared_size, + size, + compared_size - size + ) }, std::cmp::Ordering::Equal => { format!("{}", size)