From ac384db71fb283246fa2863c2558695fc1e86b9e Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 1 Oct 2020 18:21:20 +0300 Subject: [PATCH] builder: cleanup .timing_message/2 --- vlib/v/builder/builder.v | 3 ++- vlib/v/util/errors.v | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vlib/v/builder/builder.v b/vlib/v/builder/builder.v index 7ad09f8c3e..427a1c11fd 100644 --- a/vlib/v/builder/builder.v +++ b/vlib/v/builder/builder.v @@ -334,7 +334,8 @@ fn verror(s string) { } pub fn (mut b Builder) timing_message(msg string, ms i64) { - formatted_message := '$msg: ${util.bold(ms.str())} ms' + value := util.bold('$ms') + formatted_message := '$msg: $value ms' if b.pref.show_timings { println(formatted_message) } else { diff --git a/vlib/v/util/errors.v b/vlib/v/util/errors.v index c66b04ec5e..dd66460d7c 100644 --- a/vlib/v/util/errors.v +++ b/vlib/v/util/errors.v @@ -35,7 +35,7 @@ mut: pub fn new_error_manager() &EManager { return &EManager{ - support_color: term.can_show_color_on_stderr() + support_color: term.can_show_color_on_stderr() && term.can_show_color_on_stdout() } }