From 0edceb6a7d25c910683603c9f8ef2902045e6927 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 May 2020 11:11:21 +0000 Subject: [PATCH 1/2] Bump number_prefix from 0.3.0 to 0.4.0 Bumps [number_prefix](https://github.com/ogham/rust-number-prefix) from 0.3.0 to 0.4.0. - [Release notes](https://github.com/ogham/rust-number-prefix/releases) - [Commits](https://github.com/ogham/rust-number-prefix/compare/v0.3.0...v0.4.0) Signed-off-by: dependabot-preview[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8d2eab0..4e728cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1344,9 +1344,9 @@ dependencies = [ [[package]] name = "number_prefix" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "openssl" diff --git a/Cargo.toml b/Cargo.toml index 9fea5e6..d5db2f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ git2 = "0.13.5" lazy_static = "1.4.0" log = "0.4.8" log4rs = "0.11.0" -number_prefix = "0.3.0" +number_prefix = "0.4.0" openssl-probe = "0.1.2" reqwest = "0.10.4" serde = "1.0.106" From 45c0d26e3337ed2d1838bff98f49c18b65e6de31 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Fri, 1 May 2020 13:18:22 +0200 Subject: [PATCH 2/2] 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,