From 8384cd00caff905d991fd02394f8a32de2734800 Mon Sep 17 00:00:00 2001 From: huncut2016 Date: Wed, 16 Mar 2022 18:17:02 +0100 Subject: [PATCH 1/2] error: there is no argument named `min_ft` solved --- src/renderer/profiler.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/profiler.rs b/src/renderer/profiler.rs index dbe4b01..5a36bf7 100644 --- a/src/renderer/profiler.rs +++ b/src/renderer/profiler.rs @@ -114,19 +114,19 @@ impl Profiler { // Show min, max, avg root_canvas.draw_str( - format!("min: {min_ft:.1}ms"), + format!("min: {}ms", min_ft), (rect.left, rect.bottom), &self.font.skia_font, &paint, ); root_canvas.draw_str( - format!("avg: {avg:.1}ms"), + format!("avg: {}ms", avg), (rect.left, rect.bottom - graph_height * 0.5), &self.font.skia_font, &paint, ); root_canvas.draw_str( - format!("max: {max_ft:.1}ms"), + format!("max: {}ms", max_ft), (rect.left, rect.bottom - graph_height), &self.font.skia_font, &paint, From 331dedebcc7385ede9bb42ff4cf700f12a9e5a7c Mon Sep 17 00:00:00 2001 From: huncut2016 Date: Sun, 20 Mar 2022 22:15:21 +0100 Subject: [PATCH 2/2] formatting argument --- src/renderer/profiler.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/profiler.rs b/src/renderer/profiler.rs index 5a36bf7..1760a0f 100644 --- a/src/renderer/profiler.rs +++ b/src/renderer/profiler.rs @@ -114,19 +114,19 @@ impl Profiler { // Show min, max, avg root_canvas.draw_str( - format!("min: {}ms", min_ft), + format!("min: {:.1}ms", min_ft), (rect.left, rect.bottom), &self.font.skia_font, &paint, ); root_canvas.draw_str( - format!("avg: {}ms", avg), + format!("avg: {:.1}ms", avg), (rect.left, rect.bottom - graph_height * 0.5), &self.font.skia_font, &paint, ); root_canvas.draw_str( - format!("max: {}ms", max_ft), + format!("max: {:.1}ms", max_ft), (rect.left, rect.bottom - graph_height), &self.font.skia_font, &paint,