From 45c0d26e3337ed2d1838bff98f49c18b65e6de31 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Fri, 1 May 2020 13:18:22 +0200 Subject: [PATCH] Use new number_prefix API --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index bd69145..d262e89 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,7 +31,7 @@ use actix_web::{ use badge::{Badge, BadgeOptions}; use futures::future::Future; use git2::Repository; -use number_prefix::{NumberPrefix, Prefixed, Standalone}; +use number_prefix::NumberPrefix; use std::{ borrow::Cow, fs::create_dir_all, @@ -193,8 +193,8 @@ where pull(&path)?; let (hoc, head, commits) = hoc(&service_path, &state.repos, &state.cache)?; let hoc_pretty = match NumberPrefix::decimal(hoc as f64) { - Standalone(hoc) => hoc.to_string(), - Prefixed(prefix, hoc) => format!("{:.1}{}", hoc, prefix), + NumberPrefix::Standalone(hoc) => hoc.to_string(), + NumberPrefix::Prefixed(prefix, hoc) => format!("{:.1}{}", hoc, prefix), }; let res = HocResult::Hoc { hoc,