From eb93bb000ae03d81788032f22c895a74a95f3ca6 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Tue, 24 Feb 2015 20:22:31 -0800 Subject: replace use of `float_to_list/2` for r15x --- src/rebar_prv_cover.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/rebar_prv_cover.erl b/src/rebar_prv_cover.erl index f3fdb24..4bcef29 100644 --- a/src/rebar_prv_cover.erl +++ b/src/rebar_prv_cover.erl @@ -162,9 +162,9 @@ mod_to_filename(TaskDir, M) -> process(Coverage) -> process(Coverage, {0, 0}). process([], {0, 0}) -> - "0.0%"; + "0%"; process([], {Cov, Not}) -> - float_to_list((Cov / (Cov + Not)) * 100, [{decimals, 1}]) ++ "%"; + integer_to_list(trunc((Cov / (Cov + Not)) * 100)) ++ "%"; %% line 0 is a line added by eunit and never executed so ignore it process([{{_, 0}, _}|Rest], Acc) -> process(Rest, Acc); process([{_, {Cov, Not}}|Rest], {Covered, NotCovered}) -> -- cgit v1.1