From aa00ec88d8ffc1532ad554bc7fd171eee17d953c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20K=C3=B6ssel?= Date: Mon, 13 Mar 2017 15:42:11 +0100 Subject: [PATCH] Turn .as_ref() calls into .to_string() calls to remove type ambiguity. Fixes #47 --- src/pb.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pb.rs b/src/pb.rs index 959c84af..461823f7 100644 --- a/src/pb.rs +++ b/src/pb.rs @@ -375,12 +375,12 @@ impl ProgressBar { let rema_count = size - curr_count; base = self.bar_start.clone(); if rema_count > 0 && curr_count > 0 { - base = base + repeat!(self.bar_current.as_ref(), curr_count - 1) + + base = base + repeat!(self.bar_current.to_string(), curr_count - 1) + &self.bar_current_n; } else { - base = base + repeat!(self.bar_current.as_ref(), curr_count); + base = base + repeat!(self.bar_current.to_string(), curr_count); } - base = base + repeat!(self.bar_remain.as_ref(), rema_count) + &self.bar_end; + base = base + repeat!(self.bar_remain.to_string(), rema_count) + &self.bar_end; } } }