Codebase list rust-bzip2 / 9c641d5
indicatif: add missing patch file taken from uploaded source package. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Fabian Grünbichler 2 years ago
1 changed file(s) with 69 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 From d0a7028c926ba9a2eeb04dfbb0914c765026e6c3 Mon Sep 17 00:00:00 2001
1 From: mibac138 <5672750+mibac138@users.noreply.github.com>
2 Date: Wed, 15 Apr 2020 02:07:42 +0200
3 Subject: [PATCH] Update number_prefix to 0.4
4
5 ---
6 Cargo.toml | 2 +-
7 src/format.rs | 14 +++++++-------
8 2 files changed, 8 insertions(+), 8 deletions(-)
9
10 Index: indicatif/Cargo.toml
11 ===================================================================
12 --- indicatif.orig/Cargo.toml
13 +++ indicatif/Cargo.toml
14 @@ -29,7 +29,7 @@ version = ">=0.8.0, <1.0.0"
15 version = "1.0"
16
17 [dependencies.number_prefix]
18 -version = "0.3"
19 +version = "0.4"
20
21 [dependencies.rayon]
22 version = "1.0"
23 Index: indicatif/src/format.rs
24 ===================================================================
25 --- indicatif.orig/src/format.rs
26 +++ indicatif/src/format.rs
27 @@ -1,7 +1,7 @@
28 use std::fmt;
29 use std::time::Duration;
30
31 -use number_prefix::{NumberPrefix, PrefixNames, Prefixed, Standalone};
32 +use number_prefix::NumberPrefix;
33
34 /// Wraps an std duration for human basic formatting.
35 #[derive(Debug)]
36 @@ -77,8 +77,8 @@ impl fmt::Display for HumanDuration {
37 impl fmt::Display for HumanBytes {
38 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
39 match NumberPrefix::binary(self.0 as f64) {
40 - Standalone(number) => write!(f, "{:.0}B", number),
41 - Prefixed(prefix, number) => write!(
42 + NumberPrefix::Standalone(number) => write!(f, "{:.0}B", number),
43 + NumberPrefix::Prefixed(prefix, number) => write!(
44 f,
45 "{:.2}{}B",
46 number,
47 @@ -91,8 +91,8 @@ impl fmt::Display for HumanBytes {
48 impl fmt::Display for DecimalBytes {
49 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
50 match NumberPrefix::decimal(self.0 as f64) {
51 - Standalone(number) => write!(f, "{:.0}B", number),
52 - Prefixed(prefix, number) => write!(f, "{:.2}{}B", number, prefix),
53 + NumberPrefix::Standalone(number) => write!(f, "{:.0}B", number),
54 + NumberPrefix::Prefixed(prefix, number) => write!(f, "{:.2}{}B", number, prefix),
55 }
56 }
57 }
58 @@ -100,8 +100,8 @@ impl fmt::Display for DecimalBytes {
59 impl fmt::Display for BinaryBytes {
60 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
61 match NumberPrefix::binary(self.0 as f64) {
62 - Standalone(number) => write!(f, "{:.0}B", number),
63 - Prefixed(prefix, number) => write!(f, "{:.2}{}B", number, prefix),
64 + NumberPrefix::Standalone(number) => write!(f, "{:.0}B", number),
65 + NumberPrefix::Prefixed(prefix, number) => write!(f, "{:.2}{}B", number, prefix),
66 }
67 }
68 }